| /llvm-project-15.0.7/clang/include/clang/StaticAnalyzer/Core/BugReporter/ |
| H A D | BugType.h | 27 class BugType { 38 BugType(CheckerNameRef CheckerName, StringRef Name, StringRef Cat, 42 BugType(const CheckerBase *Checker, StringRef Name, StringRef Cat, 46 virtual ~BugType() = default; 67 class BuiltinBug : public BugType { 73 : BugType(checker, name, categories::LogicError), desc(description) {} in BuiltinBug() 77 : BugType(checker, name, categories::LogicError), desc(description) {} in BuiltinBug() 80 : BugType(checker, name, categories::LogicError), desc(name) {} in BuiltinBug() 83 : BugType(checker, name, categories::LogicError), desc(name) {} in BuiltinBug()
|
| H A D | BugReporter.h | 57 class BugType; variable 128 const BugType& BT; 136 BugReport(Kind kind, const BugType &bt, StringRef desc) in BugReport() 139 BugReport(Kind K, const BugType &BT, StringRef ShortDescription, in BugReport() 149 const BugType& getBugType() const { return BT; } in getBugType() 256 BasicBugReport(const BugType &bt, StringRef desc, PathDiagnosticLocation l) in BasicBugReport() 369 PathSensitiveBugReport(const BugType &bt, StringRef desc, in PathSensitiveBugReport() 373 PathSensitiveBugReport(const BugType &bt, StringRef shortDesc, StringRef desc, in PathSensitiveBugReport() 386 PathSensitiveBugReport(const BugType &bt, StringRef desc, in PathSensitiveBugReport() 642 llvm::StringMap<std::unique_ptr<BugType>> StrBugTypes; [all …]
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/ |
| H A D | MPIBugReporter.h | 28 UnmatchedWaitBugType.reset(new BugType(&CB, "Unmatched wait", MPIError)); in MPIBugReporter() 30 new BugType(&CB, "Double nonblocking", MPIError)); in MPIBugReporter() 31 MissingWaitBugType.reset(new BugType(&CB, "Missing wait", MPIError)); in MPIBugReporter() 74 std::unique_ptr<BugType> UnmatchedWaitBugType; 75 std::unique_ptr<BugType> MissingWaitBugType; 76 std::unique_ptr<BugType> DoubleNonblockingBugType;
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | CallAndMessageChecker.cpp | 36 mutable std::unique_ptr<BugType> BT_call_null; 37 mutable std::unique_ptr<BugType> BT_call_undef; 38 mutable std::unique_ptr<BugType> BT_cxx_call_null; 40 mutable std::unique_ptr<BugType> BT_call_arg; 42 mutable std::unique_ptr<BugType> BT_msg_undef; 45 mutable std::unique_ptr<BugType> BT_msg_arg; 46 mutable std::unique_ptr<BugType> BT_msg_ret; 47 mutable std::unique_ptr<BugType> BT_call_few_args; 503 BugType *BT = BT_cxx_delete_undef.get(); in checkCXXDeallocation() 522 std::unique_ptr<BugType> *BT; in checkArgInitializedness() [all …]
|
| H A D | SmartPtrChecker.cpp | 33 static const BugType *NullDereferenceBugTypePtr; 38 BugType NullDereferenceBugType{this, "Null SmartPtr dereference", 54 const BugType *getNullDereferenceBugType() { return NullDereferenceBugTypePtr; } in getNullDereferenceBugType()
|
| H A D | PthreadLockChecker.cpp | 171 void reportBug(CheckerContext &C, std::unique_ptr<BugType> BT[], 227 mutable std::unique_ptr<BugType> BT_doublelock[CK_NumCheckKinds]; 228 mutable std::unique_ptr<BugType> BT_doubleunlock[CK_NumCheckKinds]; 229 mutable std::unique_ptr<BugType> BT_destroylock[CK_NumCheckKinds]; 230 mutable std::unique_ptr<BugType> BT_initlock[CK_NumCheckKinds]; 231 mutable std::unique_ptr<BugType> BT_lor[CK_NumCheckKinds]; 237 new BugType{CheckNames[CheckKind], "Double locking", "Lock checker"}); in initBugType() 240 BT_destroylock[CheckKind].reset(new BugType{ in initBugType() 242 BT_initlock[CheckKind].reset(new BugType{ in initBugType() 244 BT_lor[CheckKind].reset(new BugType{CheckNames[CheckKind], in initBugType() [all …]
|
| H A D | NSErrorChecker.cpp | 145 class NSErrorDerefBug : public BugType { 148 : BugType(Checker, "NSError** null dereference", in NSErrorDerefBug() 152 class CFErrorDerefBug : public BugType { 155 : BugType(Checker, "CFErrorRef* null dereference", in CFErrorDerefBug() 276 BugType *bug = nullptr; in checkEvent()
|
| H A D | TaintTesterChecker.cpp | 26 std::unique_ptr<BugType> BT = 27 std::make_unique<BugType>(this, "Tainted data", "General");
|
| H A D | VirtualCallChecker.cpp | 46 mutable std::unique_ptr<BugType> BT_Pure, BT_Impure; 144 const std::unique_ptr<BugType> &BT = IsPure ? BT_Pure : BT_Impure; in checkPreCall() 210 Chk->BT_Pure = std::make_unique<BugType>(Mgr.getCurrentCheckerName(), in registerPureVirtualCallChecker() 219 Chk->BT_Impure = std::make_unique<BugType>( in registerVirtualCallChecker()
|
| H A D | SimpleStreamChecker.cpp | 57 std::unique_ptr<BugType> DoubleCloseBugType; 58 std::unique_ptr<BugType> LeakBugType; 96 new BugType(this, "Double fclose", "Unix Stream API Error")); in REGISTER_MAP_WITH_PROGRAMSTATE() 100 new BugType(this, "Resource Leak", "Unix Stream API Error", in REGISTER_MAP_WITH_PROGRAMSTATE()
|
| H A D | DeadStoresChecker.cpp | 212 const char *BugType = nullptr; in Report() local 218 BugType = "Dead initialization"; in Report() 242 BugType = "Dead increment"; in Report() 245 if (!BugType) BugType = "Dead assignment"; in Report() 253 BugType = "Dead nested assignment"; in Report() 261 BR.EmitBasicReport(AC->getDecl(), Checker, BugType, categories::UnusedCode, in Report()
|
| H A D | NSAutoreleasePoolChecker.cpp | 34 mutable std::unique_ptr<BugType> BT; 61 BT.reset(new BugType(this, "Use -drain instead of -release", in checkPreObjCMessage()
|
| H A D | MmapWriteExecChecker.cpp | 34 mutable std::unique_ptr<BugType> BT; 64 BT.reset(new BugType(this, "W^X check fails, Write Exec prot flags set", "Security")); in checkPreCall()
|
| H A D | CloneChecker.cpp | 38 mutable std::unique_ptr<BugType> BT_Exact, BT_Suspicious; 112 BT_Exact.reset(new BugType(this, "Exact code clone", "Code clone")); in reportClones() 159 new BugType(this, "Suspicious code clone", "Code clone")); in reportSuspiciousClones()
|
| H A D | DeleteWithNonVirtualDtorChecker.cpp | 39 mutable std::unique_ptr<BugType> BT; 89 BT.reset(new BugType(this, in checkPreStmt()
|
| H A D | NonNullParamChecker.cpp | 34 mutable std::unique_ptr<BugType> BTAttrNonNull; 35 mutable std::unique_ptr<BugType> BTNullRefArg; 285 BTAttrNonNull.reset(new BugType( in genReportNullAttrNonNull()
|
| H A D | DebugContainerModeling.cpp | 31 std::unique_ptr<BugType> DebugMsgBugType; 60 new BugType(this, "Checking analyzer assumptions", "debug", in DebugContainerModeling()
|
| H A D | MacOSXAPIChecker.cpp | 34 mutable std::unique_ptr<BugType> BT_dispatchOnce; 140 BT_dispatchOnce.reset(new BugType(this, "Improper use of 'dispatch_once'", in CheckDispatchOnce()
|
| H A D | UnixAPIChecker.cpp | 42 mutable std::unique_ptr<BugType> BT_open, BT_pthreadOnce; 67 mutable std::unique_ptr<BugType> BT_mallocZero; 91 std::unique_ptr<BugType> &BT, in LazyInitialize() 95 BT.reset(new BugType(Checker, name, categories::UnixAPI)); in LazyInitialize()
|
| H A D | StreamChecker.cpp | 211 BugType BT_FileNull{this, "NULL stream pointer", "Stream handling error"}; 212 BugType BT_UseAfterClose{this, "Closed stream", "Stream handling error"}; 213 BugType BT_UseAfterOpenFailed{this, "Invalid stream", 215 BugType BT_IndeterminatePosition{this, "Invalid stream state", 217 BugType BT_IllegalWhence{this, "Illegal whence argument", 219 BugType BT_StreamEof{this, "Stream already in EOF", "Stream handling error"}; 220 BugType BT_ResourceLeak{this, "Resource leak", "Stream handling error", 235 const BugType *getBT_StreamEof() const { return &BT_StreamEof; } in getBT_StreamEof() 384 const BugType *BT_ResourceLeak;
|
| H A D | DebugIteratorModeling.cpp | 31 std::unique_ptr<BugType> DebugMsgBugType; 63 new BugType(this, "Checking analyzer assumptions", "debug", in DebugIteratorModeling()
|
| H A D | InvalidatedIteratorChecker.cpp | 34 std::unique_ptr<BugType> InvalidatedBugType; 54 new BugType(this, "Iterator invalidated", "Misuse of STL APIs")); in InvalidatedIteratorChecker()
|
| H A D | BlockInCriticalSectionChecker.cpp | 41 std::unique_ptr<BugType> BlockInCritSectionBugType; 82 new BugType(this, "Call to blocking function in critical section", in REGISTER_TRAIT_WITH_PROGRAMSTATE()
|
| /llvm-project-15.0.7/clang/lib/Analysis/plugins/SampleAnalyzer/ |
| H A D | MainCallChecker.cpp | 11 mutable std::unique_ptr<BugType> BT; 37 BT.reset(new BugType(this, "call to main", "example analyzer plugin")); in checkPreStmt()
|
| /llvm-project-15.0.7/clang/unittests/StaticAnalyzer/ |
| H A D | NoStateChangeFuncVisitorTest.cpp | 85 mutable std::unique_ptr<BugType> BT; 106 BT.reset(new BugType(this->getCheckerName(), "error()", in checkPreCall()
|