[clang] Clang format numeric literal validity (PR #206516)
Gustas JanuĊĦonis via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 23 12:58:57 PDT 2026
LeGusto wrote:
> If you want to work on this, the fixer should check if this is currently an include statement or a macro invocation. Shouldn't be that hard and can definitely be two distinct PRs.
It seems like macro invocation is difficult due to the fact that they can be defined in some other header file, e.g.
```
// a.h
#define FOO(x) foo##x
```
```
// b.c
#include "a.h"
FOO(16header)
```
Given that it currently formats the raw lexer output, how would it be able to deduce that FOO is a macro invocation when formatting b.c without recursively preprocessing includes?
https://github.com/llvm/llvm-project/pull/206516
More information about the cfe-commits
mailing list