[clang] [clang] Skip auto-init on scalar vars that have a non-constant Init and no self-ref (PR #94642)
Alexander Potapenko via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 12 08:06:21 PDT 2024
================
@@ -15,7 +15,7 @@ struct Foo {
int foo(unsigned n) {
bool var_size_1;
- long var_size_8 = 123;
----------------
ramosian-glider wrote:
Can we have both the test cases in which scalar variables are auto-inited and where the initialization is skipped?
Something along the lines of:
```
long var_size_8_init = 123;
long var_size_8_noinit;
long var_size_8_init_later;
...
var_size_8_init_later = 456;
```
https://github.com/llvm/llvm-project/pull/94642
More information about the cfe-commits
mailing list