[clang] [Clang] Initialize bypassed variables w/ trivial-auto-var-init (PR #181937)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 17 15:56:17 PST 2026
https://github.com/efriedma-quic commented:
This is a little different from gcc. Consider, for example:
```
void g(int*);
void f() {
while (true) {
goto X;
int x;
X:
g(&x);
}
}
```
This patch initializers "x" once, before the loop. gcc initializes "x" each loop iteration.
I'm not sure how much that difference matters in practice.
https://github.com/llvm/llvm-project/pull/181937
More information about the cfe-commits
mailing list