[clang] [clang] Don't fold reads of modifiable file-scope compound literals (PR #241126)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 16 14:25:04 PST 2026


================
@@ -9344,6 +9380,9 @@ class ExprEvaluatorBase
       if (!EvaluateLValue(E->getSubExpr(), LVal, Info))
         return false;
       APValue RVal;
+      llvm::SaveAndRestore DirectRead(
----------------
efriedma-quic wrote:

There's only one layer between this code and the code that's actually using the result of this computation; please just pass it as an argument.

https://github.com/llvm/llvm-project/pull/241126


More information about the cfe-commits mailing list