aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/Interp/Interp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/Interp/Interp.cpp')
-rw-r--r--clang/lib/AST/Interp/Interp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/Interp/Interp.cpp b/clang/lib/AST/Interp/Interp.cpp
index 82bc1f2..b2fe70d 100644
--- a/clang/lib/AST/Interp/Interp.cpp
+++ b/clang/lib/AST/Interp/Interp.cpp
@@ -462,6 +462,10 @@ bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) {
if (S.getLangOpts().CPlusPlus11) {
const FunctionDecl *DiagDecl = F->getDecl();
+ // Invalid decls have been diagnosed before.
+ if (DiagDecl->isInvalidDecl())
+ return false;
+
// If this function is not constexpr because it is an inherited
// non-constexpr constructor, diagnose that directly.
const auto *CD = dyn_cast<CXXConstructorDecl>(DiagDecl);