aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Baeder <tbaeder@redhat.com>2025-08-10 18:56:15 +0200
committerGitHub <noreply@github.com>2025-08-10 18:56:15 +0200
commitb08e86cb7f7368531c4c12502dc1bed78f3e19a1 (patch)
tree8602d0e7b206850ffce0cdbb1418fa64aa2e35c7
parent61842ac3793c5b532f254fdec30833cd53671c2b (diff)
downloadllvm-b08e86cb7f7368531c4c12502dc1bed78f3e19a1.zip
llvm-b08e86cb7f7368531c4c12502dc1bed78f3e19a1.tar.gz
llvm-b08e86cb7f7368531c4c12502dc1bed78f3e19a1.tar.bz2
[clang][bytecode] Move CheckExtern call into isAccessible() block (#152926)
This is where it belongs, but it was accidentally left where it was.
-rw-r--r--clang/lib/AST/ByteCode/Interp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index 73507d2..931d387 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -885,12 +885,12 @@ bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
if (!Ptr.block()->isAccessible()) {
if (!CheckLive(S, OpPC, Ptr, AK_Assign))
return false;
+ if (!CheckExtern(S, OpPC, Ptr))
+ return false;
return CheckDummy(S, OpPC, Ptr.block(), AK_Assign);
}
if (!CheckLifetime(S, OpPC, Ptr.getLifetime(), AK_Assign))
return false;
- if (!CheckExtern(S, OpPC, Ptr))
- return false;
if (!CheckRange(S, OpPC, Ptr, AK_Assign))
return false;
if (!CheckActive(S, OpPC, Ptr, AK_Assign))