Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class AnalysisConsumer : public AnalysisASTConsumer,
void storeTopLevelDecls(DeclGroupRef DG);

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

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

AnalysisConsumer::AnalysisMode
AnalysisConsumer::getModeForDecl(Decl *D, AnalysisMode Mode) {
AnalysisConsumer::getModeForDecl(const Decl *D, AnalysisMode Mode) {
if (!Opts.AnalyzeSpecificFunction.empty() &&
AnalysisDeclContext::getFunctionName(D) != Opts.AnalyzeSpecificFunction &&
cross_tu::CrossTranslationUnitContext::getLookupName(D).value_or("") !=
Expand All @@ -695,7 +695,7 @@ AnalysisConsumer::getModeForDecl(Decl *D, AnalysisMode Mode) {

const SourceManager &SM = Ctx->getSourceManager();

const SourceLocation Loc = [&SM](Decl *D) -> SourceLocation {
const SourceLocation Loc = [&SM](const Decl *D) -> SourceLocation {
const Stmt *Body = D->getBody();
SourceLocation SL = Body ? Body->getBeginLoc() : D->getLocation();
return SM.getExpansionLoc(SL);
Expand Down
Loading