Differential D66265 Diff 215299 cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
Changeset View
Changeset View
Standalone View
Standalone View
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | public: | ||||
/// Create a BugReport with a custom uniqueing location. | /// Create a BugReport with a custom uniqueing location. | ||||
/// | /// | ||||
/// The reports that have the same report location, description, bug type, and | /// The reports that have the same report location, description, bug type, and | ||||
/// ranges are uniqued - only one of the equivalent reports will be presented | /// ranges are uniqued - only one of the equivalent reports will be presented | ||||
/// to the user. This method allows to rest the location which should be used | /// to the user. This method allows to rest the location which should be used | ||||
/// for uniquing reports. For example, memory leaks checker, could set this to | /// for uniquing reports. For example, memory leaks checker, could set this to | ||||
/// the allocation site, rather then the location where the bug is reported. | /// the allocation site, rather then the location where the bug is reported. | ||||
BugReport(BugType& bt, StringRef desc, const ExplodedNode *errornode, | BugReport(BugType &bt, StringRef desc, const ExplodedNode *errornode, | ||||
PathDiagnosticLocation LocationToUnique, const Decl *DeclToUnique) | PathDiagnosticLocation LocationToUnique, const Decl *DeclToUnique) | ||||
: BT(bt), Description(desc), UniqueingLocation(LocationToUnique), | : BT(bt), Description(desc), UniqueingLocation(LocationToUnique), | ||||
UniqueingDecl(DeclToUnique), ErrorNode(errornode) {} | UniqueingDecl(DeclToUnique), ErrorNode(errornode), | ||||
ErrorNodeRange(getStmt() ? getStmt()->getSourceRange() | |||||
: SourceRange()) {} | |||||
virtual ~BugReport() = default; | virtual ~BugReport() = default; | ||||
const BugType& getBugType() const { return BT; } | const BugType& getBugType() const { return BT; } | ||||
//BugType& getBugType() { return BT; } | //BugType& getBugType() { return BT; } | ||||
/// True when the report has an execution path associated with it. | /// True when the report has an execution path associated with it. | ||||
/// | /// | ||||
▲ Show 20 Lines • Show All 470 Lines • Show Last 20 Lines |