huang-me wrote: > If I understand it correctly, your change doesn't handle declarations that > are in inner statements, e.g. the variable "x" in the following code: > > ```c++ > switch (get_value()) { > case 42: > do { > int x; > // ... > } while (running); > //... > } > ``` > > Is this compatible with the goals of your commit, or would the original crash > remain in a situation like this?
As far as I understand it, the declaration within the `CaseStmt` would be found before reaching `SwitchStmt` so I don't think we need to consider this situation. https://github.com/llvm/llvm-project/pull/82089 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits