[clang] [clang][bytecode] Move a local variable to a later point (PR #121250)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 27 21:43:32 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
We don't need `E` before.
---
Full diff: https://github.com/llvm/llvm-project/pull/121250.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Pointer.cpp (+1-1)
``````````diff
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);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/121250
More information about the cfe-commits
mailing list