Skip to content

Commit f71dd84

Browse files
committed
handle when call event doesn't have a decl
1 parent 8a5a967 commit f71dd84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/StaticAnalyzer/Core/CallEvent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ ProgramStateRef CallEvent::invalidateRegions(unsigned BlockCount,
280280
bool ShouldPreserveGlobals = false;
281281
const SummaryContext *SummaryCtx =
282282
State->getStateManager().getOwningEngine().getSummaryCtx();
283-
const FunctionDecl *FD = llvm::dyn_cast<FunctionDecl>(getDecl());
283+
const FunctionDecl *FD = llvm::dyn_cast_or_null<FunctionDecl>(getDecl());
284284
if (SummaryCtx && FD) {
285285
const auto *Summary = SummaryCtx->GetSummary(FD);
286286
ShouldPreserveGlobals =

0 commit comments

Comments
 (0)