[all-commits] [llvm/llvm-project] 7b4e71: [clang-format] Don't annotate left brace of class ...
Owen via All-commits
all-commits at lists.llvm.org
Wed Mar 8 05:19:20 PST 2023
Branch: refs/heads/release/16.x
Home: https://github.com/llvm/llvm-project
Commit: 7b4e71bcf991a6b2e5cee26112a14bb62ceee0b8
https://github.com/llvm/llvm-project/commit/7b4e71bcf991a6b2e5cee26112a14bb62ceee0b8
Author: Owen Pan <owenpiano at gmail.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M clang/lib/Format/UnwrappedLineParser.cpp
M clang/unittests/Format/FormatTest.cpp
M clang/unittests/Format/TokenAnnotatorTest.cpp
Log Message:
-----------
[clang-format] Don't annotate left brace of class as FunctionLBrace
The l_brace of class/struct/union was incorrectly annotated as
TT_FunctionLBrace in the presence of attributes. This in turn
would cause the RemoveSemicolon option to remove the semicolon
at the end of the declaration, resulting in invalid code being
generated.
Fixes #61188.
Differential Revision: https://reviews.llvm.org/D145344
(cherry picked from commit a02c3af9f19d805411364e7a0de785c1d1c4e348)
More information about the All-commits
mailing list