Fixes https://github.com/llvm/llvm-project/issues/24602.
Before, code like foo<b & 1> was formatted correctly but foo<b & (1)> wasn't.
This patch fixes this inconsistency.
Paths
| Differential D121846
[clang-format] Correctly recognize binary operators in template arguments with parenthesized literals. ClosedPublic Authored by curdeius on Mar 16 2022, 1:57 PM.
Details Summary Fixes https://github.com/llvm/llvm-project/issues/24602. Before, code like foo<b & 1> was formatted correctly but foo<b & (1)> wasn't.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Mar 16 2022, 2:06 PM This revision was landed with ongoing or failed builds.Mar 17 2022, 1:37 AM Closed by commit rGdc142ea184a5: [clang-format] Correctly recognize binary operators in template arguments with… (authored by curdeius). · Explain Why This revision was automatically updated to reflect the committed changes. curdeius marked an inline comment as done.
Revision Contents
Diff 416092 clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp
|
Remove braces. :)