[clang] [clang][ExprConst] Don't create useless temporary variable (PR #67716)

2023-09-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/67716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Don't create useless temporary variable (PR #67716)

2023-09-28 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ah, didn't realize that. We should have a test case for this. https://github.com/llvm/llvm-project/pull/67716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Don't create useless temporary variable (PR #67716)

2023-09-28 Thread Richard Smith via cfe-commits
zygoloid wrote: The semantics of `ArrayInitLoopExpr` are to first evaluate (once, up-front) the common expression, and then evaluate the subexpression once for each array element, where the subexpression can make repeated reference to the value of the common expression. With this change, we wi

[clang] [clang][ExprConst] Don't create useless temporary variable (PR #67716)

2023-09-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes We never use it anyway. This code has been introduced in 410306bf6ed906af77978caa199e5d96376bae66, but it didn't really do anything back then either, as far as I can tell. Fixes #57135 --- Full diff: https://github.com/llvm/llvm-project/

[clang] [clang][ExprConst] Don't create useless temporary variable (PR #67716)

2023-09-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/67716 We never use it anyway. This code has been introduced in 410306bf6ed906af77978caa199e5d96376bae66, but it didn't really do anything back then either, as far as I can tell. Fixes #57135 >From 9d2444645dfe72889