diff options
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index d5c0463..96f8d49 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -18536,6 +18536,10 @@ bool Sema::BuiltinWasmTableCopy(CallExpr *TheCall) { /// and enforce_tcb_leaf attributes. void Sema::CheckTCBEnforcement(const SourceLocation CallExprLoc, const NamedDecl *Callee) { + // This warning does not make sense in code that has no runtime behavior. + if (isUnevaluatedContext()) + return; + const NamedDecl *Caller = getCurFunctionOrMethodDecl(); if (!Caller || !Caller->hasAttr<EnforceTCBAttr>()) |