[clang] [clang-format] Don't sort qualifiers across preprocessor directives (PR #81958)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 16 23:15:06 PST 2024
owenca wrote:
> LGTM, as long as someone doesn't say it should be
>
> ```c++
> #if FOO
> constexpr
> #endif
> inline
> int i = 0;
> ```
>
> but I think this change is fine..I would rather we didn't try and support that.. thank you.
Yep! Otherwise, you would have to handle the following, given that the order is `[const, inline, constexpr, type]`:
```c++
inline
#if FOO
constexpr /* foo */
#else
const /* bar */
#endif
int i = 0;
```
https://github.com/llvm/llvm-project/pull/81958
More information about the cfe-commits
mailing list