summaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Interp.cpp
diff options
context:
space:
mode:
authorTimm Baeder <tbaeder@redhat.com>2025-10-16 08:41:47 +0200
committerGitHub <noreply@github.com>2025-10-16 08:41:47 +0200
commit06cc20c10fe6d669a2a12747a7dabac161163c19 (patch)
tree4ac46e929df0a1dfc69929e01bdc2bbf2fb15d01 /clang/lib/AST/ByteCode/Interp.cpp
parent0ede5637ff192398abd09b3d104d43e3be3dfa24 (diff)
[clang][bytecode] Diagnose out-of-bounds enum values in .... (#163530)
... non-constexpr variable initializers.
Diffstat (limited to 'clang/lib/AST/ByteCode/Interp.cpp')
-rw-r--r--clang/lib/AST/ByteCode/Interp.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index 89043968915a..a72282caf5e7 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -1358,9 +1358,6 @@ bool Free(InterpState &S, CodePtr OpPC, bool DeleteIsArrayForm,
void diagnoseEnumValue(InterpState &S, CodePtr OpPC, const EnumDecl *ED,
const APSInt &Value) {
- if (S.EvaluatingDecl && !S.EvaluatingDecl->isConstexpr())
- return;
-
llvm::APInt Min;
llvm::APInt Max;
ED->getValueRange(Max, Min);