aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/InterpBuiltin.cpp
diff options
context:
space:
mode:
authorTimm Baeder <tbaeder@redhat.com>2025-03-31 18:53:12 +0200
committerGitHub <noreply@github.com>2025-03-31 18:53:12 +0200
commita0e1e680d28c4ef5f87be948d1d223fbfda2950c (patch)
tree02b1f4ad02bb47a58a47d0a2e233506421a94e50 /clang/lib/AST/ByteCode/InterpBuiltin.cpp
parent11dd7d98a6ecd2374289b6a217e358e503d4778a (diff)
downloadllvm-a0e1e680d28c4ef5f87be948d1d223fbfda2950c.zip
llvm-a0e1e680d28c4ef5f87be948d1d223fbfda2950c.tar.gz
llvm-a0e1e680d28c4ef5f87be948d1d223fbfda2950c.tar.bz2
[clang][bytecode] Return Invalid() on non-constexpr builtins (#133700)
So the diagnostic output matches with the current interpreter
Diffstat (limited to 'clang/lib/AST/ByteCode/InterpBuiltin.cpp')
-rw-r--r--clang/lib/AST/ByteCode/InterpBuiltin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index 4d125e4..3029314 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -2125,7 +2125,7 @@ static bool interp__builtin_memchr(InterpState &S, CodePtr OpPC,
bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const Function *F,
const CallExpr *Call, uint32_t BuiltinID) {
if (!S.getASTContext().BuiltinInfo.isConstantEvaluated(BuiltinID))
- return false;
+ return Invalid(S, OpPC);
const InterpFrame *Frame = S.Current;