https://github.com/tbaederr created 
https://github.com/llvm/llvm-project/pull/152926

This is where it belongs, but it was accidentally left where it was.

>From 4e4ebbbef763d310a337402b8394ce807f5805d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbae...@redhat.com>
Date: Sun, 10 Aug 2025 18:14:45 +0200
Subject: [PATCH]  [clang][bytecode] Move CheckExtern call into isAccessible()
 block

This is where it belongs, but it was accidentally left where it was.
---
 clang/lib/AST/ByteCode/Interp.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/lib/AST/ByteCode/Interp.cpp 
b/clang/lib/AST/ByteCode/Interp.cpp
index 73507d2725a3f..931d3879f0ff8 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))

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to