[PATCH] D114725: [clang-format] add back tests which didn't cause a regression

C. Rayroud via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 29 11:04:09 PST 2021


crayroud added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:14125
   verifyFormat("typedef void (*cb) (int);", Space);
   // FIXME these tests regressed behaviour.
+  verifyFormat("T A::operator() ();", Space);
----------------
Remove the comment too.


================
Comment at: clang/unittests/Format/FormatTest.cpp:14277
+  // FIXME these tests regressed behaviour.
   // verifyFormat("T A::operator() () {}", SpaceFuncDef);
   verifyFormat("auto lambda = [] () { return 0; };", SpaceFuncDef);
----------------
What do you think of enabling this test and to remove the space before the opening parenthesis ? As it is now the expected behaviour to have no space.


================
Comment at: clang/unittests/Format/FormatTest.cpp:14353
+  // FIXME these tests regressed behaviour.
   // verifyFormat("X A::operator++ (T);", SomeSpace2);
   verifyFormat("int x = int (y);", SomeSpace2);
----------------
As the the condition is to add a space before non empty parentheses, the test is valid.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114725/new/

https://reviews.llvm.org/D114725



More information about the cfe-commits mailing list