llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> ... even when we're not performing a lvalue-to-rvalue conversion. --- Full diff: https://github.com/llvm/llvm-project/pull/125247.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/EvalEmitter.cpp (+3) ``````````diff diff --git a/clang/lib/AST/ByteCode/EvalEmitter.cpp b/clang/lib/AST/ByteCode/EvalEmitter.cpp index 9763fe89b73742..8134bbf270363e 100644 --- a/clang/lib/AST/ByteCode/EvalEmitter.cpp +++ b/clang/lib/AST/ByteCode/EvalEmitter.cpp @@ -174,6 +174,9 @@ template <> bool EvalEmitter::emitRet<PT_Ptr>(const SourceInfo &Info) { return false; } } else { + if (!Ptr.isLive() && !Ptr.isTemporary()) + return false; + EvalResult.setValue(Ptr.toAPValue(Ctx.getASTContext())); } `````````` </details> https://github.com/llvm/llvm-project/pull/125247 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits