clang
8.0.0
|
Public Member Functions | |
RefLeakReport (RefCountBug &D, const LangOptions &LOpts, ExplodedNode *n, SymbolRef sym, CheckerContext &Ctx) | |
PathDiagnosticLocation | getLocation (const SourceManager &SM) const override |
Return the "definitive" location of the reported bug. More... | |
![]() | |
RefCountReport (RefCountBug &D, const LangOptions &LOpts, ExplodedNode *n, SymbolRef sym, bool registerVisitor=true) | |
RefCountReport (RefCountBug &D, const LangOptions &LOpts, ExplodedNode *n, SymbolRef sym, StringRef endText) | |
llvm::iterator_range< ranges_iterator > | getRanges () override |
Get the SourceRanges associated with the report. More... | |
![]() | |
BugReport (BugType &bt, StringRef desc, const ExplodedNode *errornode) | |
BugReport (BugType &bt, StringRef shortDesc, StringRef desc, const ExplodedNode *errornode) | |
BugReport (BugType &bt, StringRef desc, PathDiagnosticLocation l) | |
BugReport (BugType &bt, StringRef desc, const ExplodedNode *errornode, PathDiagnosticLocation LocationToUnique, const Decl *DeclToUnique) | |
Create a BugReport with a custom uniqueing location. More... | |
virtual | ~BugReport () |
const BugType & | getBugType () const |
BugType & | getBugType () |
bool | isPathSensitive () const |
True when the report has an execution path associated with it. More... | |
const ExplodedNode * | getErrorNode () const |
StringRef | getDescription () const |
StringRef | getShortDescription (bool UseFallback=true) const |
bool | shouldPrunePath () const |
Indicates whether or not any path pruning should take place when generating a PathDiagnostic from this BugReport. More... | |
void | disablePathPruning () |
Disable all path pruning when generating a PathDiagnostic. More... | |
void | markInteresting (SymbolRef sym) |
void | markInteresting (const MemRegion *R) |
void | markInteresting (SVal V) |
void | markInteresting (const LocationContext *LC) |
bool | isInteresting (SymbolRef sym) |
bool | isInteresting (const MemRegion *R) |
bool | isInteresting (SVal V) |
bool | isInteresting (const LocationContext *LC) |
bool | isValid () const |
Returns whether or not this report should be considered valid. More... | |
void | markInvalid (const void *Tag, const void *Data) |
Marks the current report as invalid, meaning that it is probably a false positive and should not be reported to the user. More... | |
const Decl * | getDeclWithIssue () const |
Return the canonical declaration, be it a method or class, where this issue semantically occurred. More... | |
void | setDeclWithIssue (const Decl *declWithIssue) |
Specifically set the Decl where an issue occurred. More... | |
void | addNote (StringRef Msg, const PathDiagnosticLocation &Pos, ArrayRef< SourceRange > Ranges) |
Add new item to the list of additional notes that need to be attached to this path-insensitive report. More... | |
void | addNote (StringRef Msg, const PathDiagnosticLocation &Pos) |
virtual const NoteList & | getNotes () |
void | addExtraText (StringRef S) |
This allows for addition of meta data to the diagnostic. More... | |
virtual const ExtraTextList & | getExtraText () |
PathDiagnosticLocation | getUniqueingLocation () const |
Get the location on which the report should be uniqued. More... | |
const Decl * | getUniqueingDecl () const |
Get the declaration containing the uniqueing location. More... | |
const Stmt * | getStmt () const |
void | addRange (SourceRange R) |
Add a range to a bug report. More... | |
void | addVisitor (std::unique_ptr< BugReporterVisitor > visitor) |
Add custom or predefined bug report visitors to this report. More... | |
void | clearVisitors () |
Remove all visitors attached to this bug report. More... | |
visitor_iterator | visitor_begin () |
Iterators through the custom diagnostic visitors. More... | |
visitor_iterator | visitor_end () |
virtual void | Profile (llvm::FoldingSetNodeID &hash) const |
Profile to identify equivalent bug reports for error report coalescing. More... | |
Additional Inherited Members | |
![]() | |
using | ranges_iterator = const SourceRange * |
using | VisitorList = SmallVector< std::unique_ptr< BugReporterVisitor >, 8 > |
using | visitor_iterator = VisitorList::iterator |
using | ExtraTextList = SmallVector< StringRef, 2 > |
using | NoteList = SmallVector< std::shared_ptr< PathDiagnosticNotePiece >, 4 > |
![]() | |
using | Symbols = llvm::DenseSet< SymbolRef > |
using | Regions = llvm::DenseSet< const MemRegion * > |
using | InvalidationRecord = std::pair< const void *, const void * > |
Used to track unique reasons why a bug report might be invalid. More... | |
![]() | |
SymbolRef | Sym |
![]() | |
BugType & | BT |
const Decl * | DeclWithIssue = nullptr |
std::string | ShortDescription |
std::string | Description |
PathDiagnosticLocation | Location |
PathDiagnosticLocation | UniqueingLocation |
const Decl * | UniqueingDecl |
const ExplodedNode * | ErrorNode = nullptr |
SmallVector< SourceRange, 4 > | Ranges |
ExtraTextList | ExtraText |
NoteList | Notes |
SmallVector< Symbols *, 2 > | interestingSymbols |
A (stack of) a set of symbols that are registered with this report as being "interesting", and thus used to help decide which diagnostics to include when constructing the final path diagnostic. More... | |
SmallVector< Regions *, 2 > | interestingRegions |
A (stack of) set of regions that are registered with this report as being "interesting", and thus used to help decide which diagnostics to include when constructing the final path diagnostic. More... | |
llvm::SmallSet< const LocationContext *, 2 > | InterestingLocationContexts |
A set of location contexts that correspoind to call sites which should be considered "interesting". More... | |
VisitorList | Callbacks |
A set of custom visitors which generate "event" diagnostics at interesting points in the path. More... | |
llvm::FoldingSet< BugReporterVisitor > | CallbacksSet |
Used for ensuring the visitors are only added once. More... | |
bool | DoNotPrunePath = false |
When set, this flag disables all callstack pruning from a diagnostic path. More... | |
llvm::SmallSet< InvalidationRecord, 4 > | Invalidations |
If non-empty, this bug report is likely a false positive and should not be shown to the user. More... | |
Definition at line 59 of file RetainCountDiagnostics.h.
clang::ento::retaincountchecker::RefLeakReport::RefLeakReport | ( | RefCountBug & | D, |
const LangOptions & | LOpts, | ||
ExplodedNode * | n, | ||
SymbolRef | sym, | ||
CheckerContext & | Ctx | ||
) |
|
inlineoverridevirtual |
Return the "definitive" location of the reported bug.
While a bug can span an entire path, usually there is a specific location that can be used to identify where the key issue occurred. This location is used by clients rendering diagnostics.
Reimplemented from clang::ento::BugReport.
Definition at line 75 of file RetainCountDiagnostics.h.