Author: Arseniy Zaostrovnykh
Date: 2025-12-02T11:30:31Z
New Revision: c12dd598e2f76864b2ea4bcc8616334872d1c112

URL: 
https://github.com/llvm/llvm-project/commit/c12dd598e2f76864b2ea4bcc8616334872d1c112
DIFF: 
https://github.com/llvm/llvm-project/commit/c12dd598e2f76864b2ea4bcc8616334872d1c112.diff

LOG: [NFC][analyzer] Constify AnalysisConsumer::getModeForDecl (#170275)

In my previous commit I forgot that `this` argument of
AnalysisConsumer::getModeForDecl() is also never modified.
Here is the missing trailing const.

Added: 
    

Modified: 
    clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp 
b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index 7b5dca683d5a7..827fcaaf1b634 100644
--- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -364,7 +364,7 @@ class AnalysisConsumer : public AnalysisASTConsumer,
   void storeTopLevelDecls(DeclGroupRef DG);
 
   /// Check if we should skip (not analyze) the given function.
-  AnalysisMode getModeForDecl(const Decl *D, AnalysisMode Mode);
+  AnalysisMode getModeForDecl(const Decl *D, AnalysisMode Mode) const;
   void runAnalysisOnTranslationUnit(ASTContext &C);
 
   /// Print \p S to stderr if \c Opts.AnalyzerDisplayProgress is set.
@@ -677,7 +677,7 @@ void AnalysisConsumer::HandleTranslationUnit(ASTContext &C) 
{
 }
 
 AnalysisConsumer::AnalysisMode
-AnalysisConsumer::getModeForDecl(const Decl *D, AnalysisMode Mode) {
+AnalysisConsumer::getModeForDecl(const Decl *D, AnalysisMode Mode) const {
   if (!Opts.AnalyzeSpecificFunction.empty() &&
       AnalysisDeclContext::getFunctionName(D) != Opts.AnalyzeSpecificFunction 
&&
       cross_tu::CrossTranslationUnitContext::getLookupName(D).value_or("") !=


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to