summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Interp/Interp.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/Interp/Interp.h')
-rw-r--r--clang/lib/AST/Interp/Interp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/Interp/Interp.h b/clang/lib/AST/Interp/Interp.h
index 4182254357eb..dd0bacd73acb 100644
--- a/clang/lib/AST/Interp/Interp.h
+++ b/clang/lib/AST/Interp/Interp.h
@@ -2236,6 +2236,10 @@ inline bool CallPtr(InterpState &S, CodePtr OpPC, uint32_t ArgSize,
<< const_cast<Expr *>(E) << E->getSourceRange();
return false;
}
+
+ if (!FuncPtr.isValid())
+ return false;
+
assert(F);
// Check argument nullability state.