[clang] [clang-repl] Names declared in if conditions and for-init statements are local to the inner context (C++ 3.3.2p4) (PR #84150)

Stefan Gränitz via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 05:47:54 PST 2024


weliveindetail wrote:

Thanks! Added `while` with empty body as well as `switch`. Refined test output a bit, so that it now prints:
```
i = 5 (global scope)
i = 1 (while condition)
i = 2 (if condition)
i = 3 (switch condition)
i = 4 (for-init)
```

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


More information about the cfe-commits mailing list