Skip to content

Commit b08e86c

Browse files
authored
[clang][bytecode] Move CheckExtern call into isAccessible() block (#152926)
This is where it belongs, but it was accidentally left where it was.
1 parent 61842ac commit b08e86c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/AST/ByteCode/Interp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,12 +885,12 @@ bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
885885
if (!Ptr.block()->isAccessible()) {
886886
if (!CheckLive(S, OpPC, Ptr, AK_Assign))
887887
return false;
888+
if (!CheckExtern(S, OpPC, Ptr))
889+
return false;
888890
return CheckDummy(S, OpPC, Ptr.block(), AK_Assign);
889891
}
890892
if (!CheckLifetime(S, OpPC, Ptr.getLifetime(), AK_Assign))
891893
return false;
892-
if (!CheckExtern(S, OpPC, Ptr))
893-
return false;
894894
if (!CheckRange(S, OpPC, Ptr, AK_Assign))
895895
return false;
896896
if (!CheckActive(S, OpPC, Ptr, AK_Assign))

0 commit comments

Comments
 (0)