[PATCH] D121757: [clang-format] Take out common code for parsing blocks NFC
sstwcw via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 29 16:31:30 PDT 2022
sstwcw added a comment.
I ran check-clang after formatting the entire code base with the new version. It turned out it did break some tests. It seems to be because it messed up these comments.
diff --git a/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp b/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp
index 7a8d756b09fd..53b2ddd12885 100644
--- a/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp
+++ b/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp
@@ -33,8 +33,8 @@ void f(int n) {
case 6:
do {
[[fallthrough]];
- } while (
- false); // expected-error {{does not directly precede switch label}}
+ } while (false); // expected-error {{does not directly precede switch
+ // label}}
case 7:
switch (n) {
case 0:
Now I have undone the parts that changed this. Formatting with the new version yields the same result as formatting with the program built from the main branch, whether with or without the `InsertBraces` option, except for this one line:
diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp
index 4c6b6da9e415..4d063378f37c 100644
--- a/clang/test/SemaCXX/constant-expression-cxx11.cpp
+++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp
@@ -1115,7 +1115,7 @@ static_assert(check(S(5), 11), "");
namespace PR14171 {
struct X {
- constexpr(operator int)() const { return 0; }
+ constexpr (operator int)() const { return 0; }
};
static_assert(X() == 0, "");
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121757/new/
https://reviews.llvm.org/D121757
More information about the cfe-commits
mailing list