[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.
Gedare Bloom via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 26 16:02:49 PDT 2023
gedare added a comment.
In D156370#4536793 <https://reviews.llvm.org/D156370#4536793>, @HazardyKnusperkeks wrote:
> Does this result in a different annotation? Could you add a test for that?
If I understand you correctly, it does, for example:
`$ echo "void __attribute__((naked)) foo(int bar);" | clang-format -style=llvm -debug 2>&1 | grep \'foo\'`
Without the change:
M=0 C=1 T=Unknown S=1 F=0 B=0 BK=0 P=23 Name=identifier L=31 PPK=2 FakeLParens= FakeRParens=0 II=0x555d17efdce0 Text='foo'
With the change:
M=0 C=1 T=FunctionDeclarationName S=1 F=0 B=0 BK=0 P=80 Name=identifier L=31 PPK=2 FakeLParens= FakeRParens=0 II=0x559855502ce0 Text='foo'
I don't how to test for that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156370/new/
https://reviews.llvm.org/D156370
More information about the cfe-commits
mailing list