[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.

2023-11-13 Thread Owen Pan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa852869398af: [clang-format] Fix a bug in parsing function/variable names (authored by gedare, committed by owenpan). Changed prior to commit: https://reviews.llvm.org/D156370?vs=558061&id=558088#toc R

[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.

2023-11-09 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:-2224 if (PreviousNotConst->is(tok::r_paren) && -PreviousNotConst->is(TT_TypeDeclarationParen)) { +(PreviousNotConst->isOneOf(TT_TypeDeclaration

[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.

2023-11-09 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 558061. gedare added a comment. Add TokenAnnotator tests and light refactoring. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156370/new/ https://reviews.llvm.org/D156370 Files: clang/lib/Format/TokenAnnotato

[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.

2023-10-21 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D156370#4540257 , @HazardyKnusperkeks wrote: > Yes that stuff. Tests are in: > https://github.com/llvm/llvm-project/blob/main/clang/unittests/Format/TokenAnnotatorTest.cpp > If there is none that matches, just create a new on

[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.

2023-07-27 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D156370#4537033 , @gedare wrote: > In D156370#4536793 , > @HazardyKnusperkeks wrote: > >> Does this result in a different annotation? Could you add a test for that? > > If I

[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.

2023-07-26 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added a comment. In 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);"

[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.

2023-07-26 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Does this result in a different annotation? Could you add a test for that? Comment at: clang/lib/Format/TokenAnnotator.cpp:2211-2212 if (PreviousNotConst->is(tok::r_paren) && -PreviousNotConst->is(TT_TypeDeclarationParen)) { +

[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.

2023-07-26 Thread Gedare Bloom via Phabricator via cfe-commits
gedare created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. gedare requested review of this revision. Function and variable names are not detected correctly when