[all-commits] [llvm/llvm-project] a02c3a: [clang-format] Don't annotate left brace of class ...
Owen via All-commits
all-commits at lists.llvm.org
Mon Mar 6 13:07:40 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a02c3af9f19d805411364e7a0de785c1d1c4e348
https://github.com/llvm/llvm-project/commit/a02c3af9f19d805411364e7a0de785c1d1c4e348
Author: Owen Pan <owenpiano at gmail.com>
Date: 2023-03-06 (Mon, 06 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
More information about the All-commits
mailing list