/freebsd/contrib/libarchive/libarchive/test/ |
H A D | test_short_writes.c | 39 struct checker { struct 54 struct checker *checker = client_data; in short_write_callback() argument 56 size_t new_len = checker->shortbuf_len + to_write; in short_write_callback() 57 char *new_buf = realloc(checker->shortbuf, new_len); in short_write_callback() 60 checker->shortbuf = new_buf; in short_write_callback() 61 memcpy(checker->shortbuf + checker->shortbuf_len, buffer, to_write); in short_write_callback() 62 checker->shortbuf_len = new_len; in short_write_callback() 72 struct checker *checker = client_data; in full_write_callback() local 74 size_t new_len = checker->fullbuf_len + to_write; in full_write_callback() 75 char *new_buf = realloc(checker->fullbuf, new_len); in full_write_callback() [all …]
|
/freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Checkers/ |
H A D | Checkers.td | 18 // (For example, a Cocoa-specific checker that is alpha should be in 33 // The checker hierarchy under OptIn should mirror that in Alpha: checkers 136 def BitwiseShiftChecker : Checker<"BitwiseShift">, 141 "If set to true, the checker reports undefined behavior even " 149 def CallAndMessageModeling : Checker<"CallAndMessageModeling">, 153 "this checker conservatively assumes it to be non-null">, 157 def CallAndMessageChecker : Checker<"CallAndMessage">, 212 def DereferenceChecker : Checker<"NullDereference">, 223 def NonNullParamChecker : Checker<"NonNullParamChecker">, 228 def VLASizeChecker : Checker<"VLASize">, [all …]
|
H A D | CheckerBase.td | 1 //===--- CheckerBase.td - Checker TableGen classes ------------------------===// 13 /// Describes a checker or package option type. This is important for validating 40 /// -analyzer-checker-option-help. 47 /// Describes an option for a checker or a package. 64 /// Describes a package. Every checker is a part of a package, for example, 88 /// Describes what kind of documentation exists for the checker. 99 /// Describes a checker. Every builtin checker has to be registered with the use 101 /// Note that a checker has a name (e.g.: 'NullDereference'), and a fullname, 105 /// def DereferenceChecker : Checker<"NullDereference">, 107 class Checker<string name = ""> { [all …]
|
/freebsd/usr.bin/dtc/ |
H A D | checking.hh | 48 * extensibility here, not for performance. Each checker will visit the entire 51 class checker class 59 * The name of the checker. This is used for printing error messages 65 * Visits each node, calling the checker functions on properties and 72 * caused the error and the name of the checker. 77 * Constructor. Takes the name of this checker, which is which is used 80 checker(const char *name) : checker_name(name) {} in checker() function in dtc::fdt::checking::checker 84 virtual ~checker() {} in ~checker() 102 * Runs the checker on the specified device tree. 116 class property_checker : public checker [all …]
|
H A D | checking.cc | 47 struct deleted_node_checker : public checker 49 deleted_node_checker(const char *name) : checker(name) {} in deleted_node_checker() 72 * Checker that verifies that every node that has children has 75 struct address_cells_checker : public checker 77 address_cells_checker(const char *name) : checker(name) {} in address_cells_checker() 117 checker::visit_node(device_tree *tree, const node_ptr &n) in visit_node() 147 checker::report_error(const char *errmsg) in report_error() 256 auto checker = checkers.find(name); in disable_checker() local 257 if (checker != checkers.end()) in disable_checker() 260 checker->second)); in disable_checker() [all …]
|
/freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Frontend/ |
H A D | CheckerRegistry.h | 10 // specific invocation of the analyzer (which checker/package is enabled, values 11 // of their options, etc). This is in the frontend library because checker 26 // At the very least, a checker plugin is a dynamic library that exports 37 // To add a custom checker to the analyzer, the plugin must also define the 46 // The first method argument is the full name of the checker, including its 47 // enclosing package. By convention, the registered name of a checker is the 50 // checker. 56 // To load a checker plugin, specify the full path to the dynamic library as 58 // your custom checker using the -analyzer-checker: 61 // -analyzer-checker=<example.MainCallChecker> [all …]
|
/freebsd/contrib/llvm-project/clang/utils/TableGen/ |
H A D | ClangSACheckersEmitter.cpp | 141 OS << "CHECKER(" << "\""; in printChecker() 178 std::vector<Record*> checkers = Records.getAllDerivedDefinitions("Checker"); in EmitClangSACheckers() 244 // CHECKER(FULLNAME, CLASS, HELPTEXT) in EmitClangSACheckers() 245 // - FULLNAME: The full name of the checker, including packages, e.g.: in EmitClangSACheckers() 247 // - CLASS: The name of the checker, with "Checker" appended, e.g.: in EmitClangSACheckers() 249 // - HELPTEXT: The description of the checker. in EmitClangSACheckers() 253 for (const Record *checker : checkers) { in EmitClangSACheckers() local 254 printChecker(OS, *checker); in EmitClangSACheckers() 263 // - FULLNAME: The full name of the checker that depends on another checker. in EmitClangSACheckers() 264 // - DEPENDENCY: The full name of the checker FULLNAME depends on. in EmitClangSACheckers() [all …]
|
/freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/ |
H A D | CheckerManager.h | 1 //===- CheckerManager.h - Static Analyzer Checker Manager -------*- C++ -*-===// 9 // Defines the Static Analyzer Checker Manager. 67 CheckerBase *Checker; 69 CheckerFn(CheckerBase *checker, Func fn) : Fn(fn), Checker(checker) {} in CheckerFn() argument 72 return Fn(Checker, ps...); in operator() 102 /// CheckerRegistry are used as check names. We want to make sure all checker 138 // CheckerRegistry cannot be moved to the Core library, because the checker 148 /// checkers. Useful for unit testing, unless the checker infrastructure 154 /// Constructs a CheckerManager without requiring an AST. No checker 185 /// checker option value. [all …]
|
H A D | AnalyzerOptions.h | 138 /// If you'd like to add a new non-checker configuration, register it in 142 /// If you'd like to add a new checker option, call getChecker*Option() 185 /// Pairs of checker/package name and enable/disable. 188 /// Vector of checker/package names which will not emit warnings. 304 /// @param [in] CheckerName The *full name* of the checker. One may retrieve 305 /// this from the checker object's field \c Name, or through \c 306 /// CheckerManager::getCurrentCheckerName within the checker's registry 308 /// Checker options are retrieved in the following format: 312 /// specified for the given checker the options for the parent packages will 324 /// @param [in] CheckerName The *full name* of the checker. One may retrieve [all …]
|
H A D | CheckerRegistryData.h | 11 // a checker/package is enabled, their options values, etc). 15 // this information, such as enforcing rules on checker dependency bug emission, 16 // ensuring all checker options were queried, etc. 37 /// Initialization functions perform any necessary setup for a checker. 42 /// Specifies a command line option. It may either belong to a checker or a 92 /// Specifies a checker. Note that this isn't what we call a checker object, 96 // This checker wasn't explicitly enabled or disabled. 98 // This checker was explicitly disabled. 100 // This checker was explicitly enabled. 124 // Since each checker must have a different full name, we can identify
|
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
H A D | DirectIvarAssignment.cpp | 12 // Two versions of a checker exist: one that checks all methods and the other 16 // The checker does not warn about assignments to Ivars, annotated with 19 // checker. The annotation is allowed on properties and Ivars. 28 #include "clang/StaticAnalyzer/Core/Checker.h" 52 public Checker<check::ASTDecl<ObjCImplementationDecl> > { 64 const CheckerBase *Checker; member in __anonb45dccd40111::DirectIvarAssignment::MethodCrawler 70 const CheckerBase *Checker, AnalysisDeclContext *InDCtx) in MethodCrawler() argument 72 Checker(Checker), DCtx(InDCtx) {} in MethodCrawler() 183 // as a false positive suppression mechanism for the checker. The in VisitBinaryOperator() 201 MD, Checker, "Property access", categories::CoreFoundationObjectiveC, in VisitBinaryOperator() [all …]
|
H A D | CastToStructChecker.cpp | 9 // This files defines CastToStructChecker, a builtin checker that checks for 18 #include "clang/StaticAnalyzer/Core/Checker.h" 28 const CheckerBase *Checker; member in __anond888d9760111::CastToStructVisitor 32 explicit CastToStructVisitor(BugReporter &B, const CheckerBase *Checker, in CastToStructVisitor() argument 34 : BR(B), Checker(Checker), AC(A) {} in CastToStructVisitor() 66 AC->getDecl(), Checker, "Cast from non-struct type to struct type", in VisitCastExpr() 97 BR.EmitBasicReport(AC->getDecl(), Checker, "Widening cast to struct type", in VisitCastExpr() 109 class CastToStructChecker : public Checker<check::ASTCodeBody> {
|
H A D | LLVMConventionsChecker.cpp | 18 #include "clang/StaticAnalyzer/Core/Checker.h" 118 const CheckerBase *Checker; member in __anonfe7749740111::StringRefCheckerVisitor 122 const CheckerBase *checker) in StringRefCheckerVisitor() argument 123 : DeclWithIssue(declWithIssue), BR(br), Checker(checker) {} in StringRefCheckerVisitor() 137 const CheckerBase *Checker) { in CheckStringRefAssignedTemporary() argument 138 StringRefCheckerVisitor walker(D, BR, Checker); in CheckStringRefAssignedTemporary() 183 BR.EmitBasicReport(DeclWithIssue, Checker, desc, "LLVM Conventions", desc, in VisitVarDecl() 218 const CheckerBase *Checker; member in __anonfe7749740211::ASTFieldVisitor 222 const CheckerBase *checker) in ASTFieldVisitor() argument 223 : Root(root), BR(br), Checker(checker) {} in ASTFieldVisitor() [all …]
|
H A D | PaddingChecker.cpp | 9 // This file defines a checker that checks for padding that could be 22 #include "clang/StaticAnalyzer/Core/Checker.h" 33 class PaddingChecker : public Checker<check::ASTDecl<TranslationUnitDecl>> { 49 const PaddingChecker *Checker; in checkASTDecl() member 52 explicit LocalVisitor(const PaddingChecker *Checker) : Checker(Checker) {} in checkASTDecl() 54 Checker->visitRecord(RD); in checkASTDecl() 58 Checker->visitVariable(VD); in checkASTDecl() 71 /// checker. 201 // This checker only cares about the padded size of the in calculateBaselinePad() 349 auto *Checker = Mgr.registerChecker<PaddingChecker>(); in registerPaddingChecker() local [all …]
|
H A D | CheckerDocumentation.cpp | 1 //===- CheckerDocumentation.cpp - Documentation checker ---------*- C++ -*-===// 9 // This checker lists all the checker callbacks and provides documentation for 10 // checker writers. 16 #include "clang/StaticAnalyzer/Core/Checker.h" 30 /// This checker documents the callback functions checkers can use to implement 37 : public Checker< 172 /// up/reduce the checker state, which is important for reducing the overall 173 /// memory usage. Specifically, if a checker keeps symbol specific information 175 /// In addition, reporting a bug as soon as the checker becomes dead leads to 202 /// This callback should be used in cases when a checker needs to have a [all …]
|
H A D | ObjCContainersASTChecker.cpp | 9 // An AST checker that looks for common pitfalls when using 'CFArray', 18 #include "clang/StaticAnalyzer/Core/Checker.h" 29 const CheckerBase *Checker; member in __anon92c36e3f0111::WalkAST 73 WalkAST(BugReporter &br, const CheckerBase *checker, AnalysisDeclContext *ac) in WalkAST() argument 74 : BR(br), Checker(checker), AC(ac), ASTC(AC->getASTContext()), in WalkAST() 144 BR.EmitBasicReport(AC->getDecl(), Checker, OsName.str(), in VisitCallExpr() 160 class ObjCContainersASTChecker : public Checker<check::ASTCodeBody> {
|
H A D | SmartPtrChecker.cpp | 9 // This file defines a checker that check for null dereference of C++ smart 20 #include "clang/StaticAnalyzer/Core/Checker.h" 35 class SmartPtrChecker : public Checker<check::PreCall> { 49 // Define the inter-checker API. 101 SmartPtrChecker *Checker = Mgr.registerChecker<SmartPtrChecker>(); in registerSmartPtrChecker() local 102 NullDereferenceBugTypePtr = &Checker->NullDereferenceBugType; in registerSmartPtrChecker()
|
H A D | NoOwnershipChangeVisitor.h | 10 #include "clang/StaticAnalyzer/Core/Checker.h" 20 const CheckerBase &Checker; variable 66 NoOwnershipChangeVisitor(SymbolRef Sym, const CheckerBase *Checker) in NoOwnershipChangeVisitor() argument 68 Checker(*Checker) {} in NoOwnershipChangeVisitor()
|
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ |
H A D | Checker.cpp | 1 //== Checker.cpp - Registration mechanism for checkers -----------*- C++ -*--=// 9 // This file defines Checker, used to create and register checkers. 14 #include "clang/StaticAnalyzer/Core/Checker.h" 31 CheckerProgramPointTag::CheckerProgramPointTag(const CheckerBase *Checker, in CheckerProgramPointTag() argument 33 : SimpleProgramPointTag(Checker->getCheckerName().getName(), Msg) {} in CheckerProgramPointTag() 36 const CheckerBase &Checker) { in operator <<() argument 37 Out << Checker.getCheckerName().getName(); in operator <<()
|
H A D | CheckerManager.cpp | 1 //===- CheckerManager.cpp - Static Analyzer Checker Manager ---------------===// 9 // Defines the Static Analyzer Checker Manager. 20 #include "clang/StaticAnalyzer/Core/Checker.h" 92 for (const auto &checker : *checkers) in runCheckersOnASTDecl() 93 checker(D, mgr, BR); in runCheckersOnASTDecl() 173 Pred->getLocationContext(), checkFn.Checker); in runChecker() 228 const ProgramPoint &L = Msg.getProgramPoint(IsPreVisit,checkFn.Checker); in runChecker() 286 const ProgramPoint &L = Call.getProgramPoint(IsPreVisit,checkFn.Checker); in runChecker() 338 checkFn.Checker); in runChecker() 381 const ProgramPoint &L = PP.withTag(checkFn.Checker); in runChecker() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/ |
H A D | UncountedLambdaCapturesChecker.cpp | 16 #include "clang/StaticAnalyzer/Core/Checker.h" 24 : public Checker<check::ASTDecl<TranslationUnitDecl>> { 39 const UncountedLambdaCapturesChecker *Checker; in checkASTDecl() member 40 explicit LocalVisitor(const UncountedLambdaCapturesChecker *Checker) in checkASTDecl() 41 : Checker(Checker) { in checkASTDecl() 42 assert(Checker); in checkASTDecl() 49 Checker->visitLambdaExpr(L); in checkASTDecl()
|
H A D | NoUncountedMembersChecker.cpp | 19 #include "clang/StaticAnalyzer/Core/Checker.h" 29 : public Checker<check::ASTDecl<TranslationUnitDecl>> { 49 const NoUncountedMemberChecker *Checker; in checkASTDecl() member 50 explicit LocalVisitor(const NoUncountedMemberChecker *Checker) in checkASTDecl() 51 : Checker(Checker) { in checkASTDecl() 52 assert(Checker); in checkASTDecl() 59 Checker->visitRecordDecl(RD); in checkASTDecl()
|
H A D | UncountedLocalVarsChecker.cpp | 21 #include "clang/StaticAnalyzer/Core/Checker.h" 107 : public Checker<check::ASTDecl<TranslationUnitDecl>> { 123 const UncountedLocalVarsChecker *Checker; in checkASTDecl() member 129 explicit LocalVisitor(const UncountedLocalVarsChecker *Checker) in checkASTDecl() 130 : Checker(Checker) { in checkASTDecl() 131 assert(Checker); in checkASTDecl() 140 Checker->visitVarDecl(V, Init); in checkASTDecl() 148 Checker->visitVarDecl(V, BO->getRHS()); in checkASTDecl() 233 // the call by another checker. in visitVarDecl()
|
/freebsd/contrib/llvm-project/clang/lib/Analysis/plugins/CheckerOptionHandling/ |
H A D | CheckerOptionHandling.cpp | 2 #include "clang/StaticAnalyzer/Core/Checker.h" 10 struct MyChecker : public Checker<check::BeginFunction> { 15 MyChecker *Checker = Mgr.registerChecker<MyChecker>(); in registerMyChecker() local 18 Checker, "ExampleOption") in registerMyChecker() 39 /*Description*/ "This is an example checker opt.", in clang_registerCheckers()
|
/freebsd/share/mk/ |
H A D | bsd.clang-analyze.mk | 45 .for checker in ${CLANG_ANALYZE_CHECKERS} 46 CLANG_ANALYZE_FLAGS+= -Xanalyzer -analyzer-checker=${checker} 49 .for checker in ${CLANG_ANALYZE_CXX_CHECKERS} 50 CLANG_ANALYZE_CXX_FLAGS+= -Xanalyzer -analyzer-checker=${checker}
|