Issue 109358
Summary clang-format mis-annotates pointer/reference in range-based `for` loops
Labels clang-format
Assignees owenca
Reporter owenca
    This is split from #60146 and reported by @jeremyong.

> I'm seeing this also with an even simpler repro:
> 
> ```c++
> for (int i = 0; Foo& foo : foos)
> ```
> 
> turns into
> 
> ```c++
> for (int i = 0; Foo & foo : foos)
> ```
> 
> even with `PointerAlignment: Left`. I am assuming that in the presence of scoped declaration statements, subsequent `&` operators are parsed as bitwise-and operators.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to