[PATCH] D80830: [clang-format] [PR46130] When editing a file with unbalance {} the namespace comment fixer can incorrectly comment the wrong closing brace
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 29 13:41:14 PDT 2020
curdeius accepted this revision.
curdeius added a comment.
This revision is now accepted and ready to land.
LGTM.
It may be silly, but the fact that this code runs over all the tokens makes me think: do we have any performance-related non-regression tests for clang-format?
================
Comment at: clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp:1093
+
+TEST_F(NamespaceEndCommentsFixerTest, IgnoreUnbalanced) {
+ EXPECT_EQ("namespace A {\n"
----------------
Nit: You may add PR46130 in the test name *if* this is what is done usually (I see it in the test above).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80830/new/
https://reviews.llvm.org/D80830
More information about the cfe-commits
mailing list