[clang] 39e8953 - [clang][bytecode] Move a local variable to a later point (#121250)

via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 27 22:43:18 PST 2024


Author: Timm Baeder
Date: 2024-12-28T07:43:15+01:00
New Revision: 39e8953f892a51816aa1fde70829a61d7e756a51

URL: https://github.com/llvm/llvm-project/commit/39e8953f892a51816aa1fde70829a61d7e756a51
DIFF: https://github.com/llvm/llvm-project/commit/39e8953f892a51816aa1fde70829a61d7e756a51.diff

LOG: [clang][bytecode] Move a local variable to a later point (#121250)

We don't need `E` before.

Added: 
    

Modified: 
    clang/lib/AST/ByteCode/Pointer.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp
index 54484853fcdaea..01e642310aad37 100644
--- a/clang/lib/AST/ByteCode/Pointer.cpp
+++ b/clang/lib/AST/ByteCode/Pointer.cpp
@@ -476,10 +476,10 @@ bool Pointer::pointsToLiteral() const {
   if (isZero() || !isBlockPointer())
     return false;
 
-  const Expr *E = block()->getDescriptor()->asExpr();
   if (block()->isDynamic())
     return false;
 
+  const Expr *E = block()->getDescriptor()->asExpr();
   return E && !isa<MaterializeTemporaryExpr, StringLiteral>(E);
 }
 


        


More information about the cfe-commits mailing list