clang  8.0.0
Public Member Functions | List of all members
clang::ento::retaincountchecker::RefLeakReport Class Reference

#include "/work/llvm-www-releases/8.0.0/docsbuild/llvm.src/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.h"

Inheritance diagram for clang::ento::retaincountchecker::RefLeakReport:
[legend]
Collaboration diagram for clang::ento::retaincountchecker::RefLeakReport:
[legend]

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...
 
- Public Member Functions inherited from clang::ento::retaincountchecker::RefCountReport
 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_iteratorgetRanges () override
 Get the SourceRanges associated with the report. More...
 
- Public Member Functions inherited from clang::ento::BugReport
 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 BugTypegetBugType () const
 
BugTypegetBugType ()
 
bool isPathSensitive () const
 True when the report has an execution path associated with it. More...
 
const ExplodedNodegetErrorNode () 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 DeclgetDeclWithIssue () 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 NoteListgetNotes ()
 
void addExtraText (StringRef S)
 This allows for addition of meta data to the diagnostic. More...
 
virtual const ExtraTextListgetExtraText ()
 
PathDiagnosticLocation getUniqueingLocation () const
 Get the location on which the report should be uniqued. More...
 
const DeclgetUniqueingDecl () const
 Get the declaration containing the uniqueing location. More...
 
const StmtgetStmt () 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

- Public Types inherited from clang::ento::BugReport
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 >
 
- Protected Types inherited from clang::ento::BugReport
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...
 
- Protected Attributes inherited from clang::ento::retaincountchecker::RefCountReport
SymbolRef Sym
 
- Protected Attributes inherited from clang::ento::BugReport
BugTypeBT
 
const DeclDeclWithIssue = nullptr
 
std::string ShortDescription
 
std::string Description
 
PathDiagnosticLocation Location
 
PathDiagnosticLocation UniqueingLocation
 
const DeclUniqueingDecl
 
const ExplodedNodeErrorNode = 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< BugReporterVisitorCallbacksSet
 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...
 

Detailed Description

Definition at line 59 of file RetainCountDiagnostics.h.

Constructor & Destructor Documentation

◆ RefLeakReport()

clang::ento::retaincountchecker::RefLeakReport::RefLeakReport ( RefCountBug D,
const LangOptions LOpts,
ExplodedNode n,
SymbolRef  sym,
CheckerContext Ctx 
)

Member Function Documentation

◆ getLocation()

PathDiagnosticLocation clang::ento::retaincountchecker::RefLeakReport::getLocation ( const SourceManager SM) const
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.


The documentation for this class was generated from the following file: