Issue 167121
Summary [clang-format] QualifierAlignment option does not work when `ifdef` before variable declaration
Labels clang-format
Assignees
Reporter vbvictor
    If we have `ifdef` before variable declarations like this, the option [QualifierAlignment](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#qualifieralignment) doesn't format correctly:

```cpp
struct A {};

int main() {
#if true
#endif
    A const as[10]; // Need to be `const A as[10]` instead
#if true
#endif
    for (A const a : as) {} // Need to be `const A a` instead
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to