Issue 145388
Summary clang-format: QualifierAlignment doesn't work with all-caps namespace
Labels clang-format
Assignees
Reporter mathcounts4
    clang-format version 19.1.7

`_clang-format`:
```
BasedOnStyle: LLVM
QualifierAlignment: Right
```

`myfile.hpp`:
```
namespace CAPS {
	struct InCaps {};
}

namespace lowercase {
	struct InLowercase {};
}

void use(const CAPS::InCaps &, const lowercase::InLowercase &);
```

`QualifierAlignment: Right` = `east const` should change the declaration of `use` to:
```
void use(CAPS::InCaps const &, lowercase::InLowercase const &);
```
but clang-format mishandles the `CAPS` namespace (and any namespace that is all capital letters), and only modifies the second argument, producing:
```
void use(const CAPS::InCaps &, lowercase::InLowercase const &);
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to