Function and variable names are not detected correctly when there is an
__attribute__((x)) preceding the name.
Fixes Github Issue #64137
https://github.com/llvm/llvm-project/issues/64137
Paths
| Differential D156370
[clang-format] Fix bug with parsing of function/variable names. ClosedPublic Authored by gedare on Jul 26 2023, 2:21 PM.
Details Summary Function and variable names are not detected correctly when there is an Fixes Github Issue #64137
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptJul 26 2023, 2:21 PM Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. · View Herald Transcript Comment Actions Does this result in a different annotation? Could you add a test for that?
Comment Actions
If I understand you correctly, it does, for example: Without the change: With the change: I don't how to test for that. Comment Actions
Yes that stuff. Tests are in: https://github.com/llvm/llvm-project/blob/main/clang/unittests/Format/TokenAnnotatorTest.cpp Comment Actions
@gedare, I think this is the only missing piece for your patch to get accepted. 🙂 This revision is now accepted and ready to land.Nov 9 2023, 12:12 PM Closed by commit rGa852869398af: [clang-format] Fix a bug in parsing function/variable names (authored by gedare, committed by owenpan). · Explain WhyMon, Nov 13, 7:35 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 558088 clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp
clang/unittests/Format/TokenAnnotatorTest.cpp
|