;
20inline boolhasSuppression(
const Decl*
D) {
23 if(
const auto*Suppression =
D->
getAttr<SuppressAttr>())
24 return!Suppression->isGSL() &&
25(Suppression->diagnosticIdentifiers().empty());
31 returnllvm::any_of(S->getAttrs(), [](
const Attr*A) {
32const auto *Suppression = dyn_cast<SuppressAttr>(A);
33return Suppression && !Suppression->isGSL() &&
34(Suppression->diagnosticIdentifiers().empty());
62 return!
SM.isBeforeInTranslationUnit(RHS, LHS);
82CacheInitializer(ToInit).TraverseDecl(
const_cast<Decl*
>(
D));
90 returnVisitAttributedNode(
D);
97 returnVisitAttributedNode(AS);
101 template<
classNodeType>
boolVisitAttributedNode(NodeType *
Node) {
102 if(hasSuppression(
Node)) {
118CacheInitializer(Ranges &R) : Result(R) {}
139 const Decl*DeclWithIssue,
144 if(!DeclWithIssue) {
159 if(
Parent==
nullptr|| isa<TranslationUnitDecl>(
Parent))
176 autoInsertionResult = CachedSuppressionLocations.insert(
178Ranges &SuppressionRanges = InsertionResult.first->second;
179 if(InsertionResult.second) {
181CacheInitializer::initialize(DeclWithIssue, SuppressionRanges);
187 returnllvm::any_of(SuppressionRanges,
189 returnfullyContains(Suppression, BugRange,
SM);
static CharSourceRange getRange(const CharSourceRange &EditRange, const SourceManager &SM, const LangOptions &LangOpts, bool IncludeMacroExpansion)
TranslationUnitDecl * getTranslationUnitDecl() const
Attr - This represents one attribute.
Represents an attribute applied to a statement.
Decl - This represents one declaration (or definition), e.g.
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
SourceRange getSourceRange() const
For nodes which represent textual entities in the source code, return their SourceRange.
Recursive AST visitor that supports extension via dynamic dispatch.
virtual bool VisitDecl(MaybeConst< Decl > *D)
Encodes a location in the source.
This class handles loading and caching of source files into memory.
A trivial tuple used to represent a source range.
SourceLocation getEnd() const
SourceLocation getBegin() const
This class provides an interface through which checkers can create individual bug reports.
virtual PathDiagnosticLocation getUniqueingLocation() const =0
Get the location on which the report should be uniqued.
virtual PathDiagnosticLocation getLocation() const =0
The primary location of the bug report that points at the undesirable behavior in the code.
virtual const Decl * getDeclWithIssue() const =0
The smallest declaration that contains the bug location.
bool isSuppressed(const BugReport &)
Return true if the given bug report was explicitly suppressed by the user.
PathDiagnosticRange asRange() const
const SourceManager & getManager() const
The JSON file list parser is used to communicate input to InstallAPI.
void initialize(TemplateInstantiationCallbackPtrs &Callbacks, const Sema &TheSema)
@ Result
The result type of a method or function.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4