diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h | |
parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) | |
download | src-9f4dbff6669c8037f3b036bcf580d14f1a4f12a5.tar.gz src-9f4dbff6669c8037f3b036bcf580d14f1a4f12a5.zip |
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):vendor/clang/clang-release_350-r216957
Notes
Notes:
svn path=/vendor/clang/dist/; revision=274958
svn path=/vendor/clang/clang-release_350-r216957/; revision=274959; tag=vendor/clang/clang-release_350-r216957
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h')
-rw-r--r-- | include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h index 9584b8baf4f1..53712319253c 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h @@ -19,6 +19,7 @@ #include "clang/StaticAnalyzer/Core/AnalyzerOptions.h" #include "clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h" #include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h" +#include "clang/StaticAnalyzer/Core/CheckerManager.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/FoldingSet.h" @@ -143,19 +144,18 @@ private: public: BugReport(BugType& bt, StringRef desc, const ExplodedNode *errornode) - : BT(bt), DeclWithIssue(0), Description(desc), ErrorNode(errornode), + : BT(bt), DeclWithIssue(nullptr), Description(desc), ErrorNode(errornode), ConfigurationChangeToken(0), DoNotPrunePath(false) {} BugReport(BugType& bt, StringRef shortDesc, StringRef desc, const ExplodedNode *errornode) - : BT(bt), DeclWithIssue(0), ShortDescription(shortDesc), Description(desc), - ErrorNode(errornode), ConfigurationChangeToken(0), + : BT(bt), DeclWithIssue(nullptr), ShortDescription(shortDesc), + Description(desc), ErrorNode(errornode), ConfigurationChangeToken(0), DoNotPrunePath(false) {} - BugReport(BugType& bt, StringRef desc, PathDiagnosticLocation l) - : BT(bt), DeclWithIssue(0), Description(desc), Location(l), ErrorNode(0), - ConfigurationChangeToken(0), - DoNotPrunePath(false) {} + BugReport(BugType &bt, StringRef desc, PathDiagnosticLocation l) + : BT(bt), DeclWithIssue(nullptr), Description(desc), Location(l), + ErrorNode(nullptr), ConfigurationChangeToken(0), DoNotPrunePath(false) {} /// \brief Create a BugReport with a custom uniqueing location. /// @@ -166,7 +166,7 @@ public: /// the allocation site, rather then the location where the bug is reported. BugReport(BugType& bt, StringRef desc, const ExplodedNode *errornode, PathDiagnosticLocation LocationToUnique, const Decl *DeclToUnique) - : BT(bt), DeclWithIssue(0), Description(desc), + : BT(bt), DeclWithIssue(nullptr), Description(desc), UniqueingLocation(LocationToUnique), UniqueingDecl(DeclToUnique), ErrorNode(errornode), ConfigurationChangeToken(0), @@ -463,7 +463,12 @@ public: /// reports. void emitReport(BugReport *R); - void EmitBasicReport(const Decl *DeclWithIssue, + void EmitBasicReport(const Decl *DeclWithIssue, const CheckerBase *Checker, + StringRef BugName, StringRef BugCategory, + StringRef BugStr, PathDiagnosticLocation Loc, + ArrayRef<SourceRange> Ranges = None); + + void EmitBasicReport(const Decl *DeclWithIssue, CheckName CheckName, StringRef BugName, StringRef BugCategory, StringRef BugStr, PathDiagnosticLocation Loc, ArrayRef<SourceRange> Ranges = None); @@ -473,7 +478,8 @@ private: /// \brief Returns a BugType that is associated with the given name and /// category. - BugType *getBugTypeForName(StringRef name, StringRef category); + BugType *getBugTypeForName(CheckName CheckName, StringRef name, + StringRef category); }; // FIXME: Get rid of GRBugReporter. It's the wrong abstraction. @@ -505,9 +511,8 @@ public: /// /// \return True if the report was valid and a path was generated, /// false if the reports should be considered invalid. - virtual bool generatePathDiagnostic(PathDiagnostic &PD, - PathDiagnosticConsumer &PC, - ArrayRef<BugReport*> &bugReports); + bool generatePathDiagnostic(PathDiagnostic &PD, PathDiagnosticConsumer &PC, + ArrayRef<BugReport*> &bugReports) override; /// classof - Used by isa<>, cast<>, and dyn_cast<>. static bool classof(const BugReporter* R) { |