Skip to content

Commit 45c8ddf

Browse files
nectokcloudy0717
authored andcommitted
[NFC][analyzer] Constify AnalysisConsumer::getModeForDecl (llvm#170275)
In my previous commit I forgot that `this` argument of AnalysisConsumer::getModeForDecl() is also never modified. Here is the missing trailing const.
1 parent 0315417 commit 45c8ddf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class AnalysisConsumer : public AnalysisASTConsumer,
364364
void storeTopLevelDecls(DeclGroupRef DG);
365365

366366
/// Check if we should skip (not analyze) the given function.
367-
AnalysisMode getModeForDecl(const Decl *D, AnalysisMode Mode);
367+
AnalysisMode getModeForDecl(const Decl *D, AnalysisMode Mode) const;
368368
void runAnalysisOnTranslationUnit(ASTContext &C);
369369

370370
/// Print \p S to stderr if \c Opts.AnalyzerDisplayProgress is set.
@@ -677,7 +677,7 @@ void AnalysisConsumer::HandleTranslationUnit(ASTContext &C) {
677677
}
678678

679679
AnalysisConsumer::AnalysisMode
680-
AnalysisConsumer::getModeForDecl(const Decl *D, AnalysisMode Mode) {
680+
AnalysisConsumer::getModeForDecl(const Decl *D, AnalysisMode Mode) const {
681681
if (!Opts.AnalyzeSpecificFunction.empty() &&
682682
AnalysisDeclContext::getFunctionName(D) != Opts.AnalyzeSpecificFunction &&
683683
cross_tu::CrossTranslationUnitContext::getLookupName(D).value_or("") !=

0 commit comments

Comments
 (0)