@@ -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 (Decl *D, AnalysisMode Mode);
367+ AnalysisMode getModeForDecl (const Decl *D, AnalysisMode Mode);
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
679679AnalysisConsumer::AnalysisMode
680- AnalysisConsumer::getModeForDecl (Decl *D, AnalysisMode Mode) {
680+ AnalysisConsumer::getModeForDecl (const Decl *D, AnalysisMode Mode) {
681681 if (!Opts.AnalyzeSpecificFunction .empty () &&
682682 AnalysisDeclContext::getFunctionName (D) != Opts.AnalyzeSpecificFunction &&
683683 cross_tu::CrossTranslationUnitContext::getLookupName (D).value_or (" " ) !=
@@ -695,7 +695,7 @@ AnalysisConsumer::getModeForDecl(Decl *D, AnalysisMode Mode) {
695695
696696 const SourceManager &SM = Ctx->getSourceManager ();
697697
698- const SourceLocation Loc = [&SM](Decl *D) -> SourceLocation {
698+ const SourceLocation Loc = [&SM](const Decl *D) -> SourceLocation {
699699 const Stmt *Body = D->getBody ();
700700 SourceLocation SL = Body ? Body->getBeginLoc () : D->getLocation ();
701701 return SM.getExpansionLoc (SL);
0 commit comments