djasper added a comment.

Would it be enough to only add the block type case? With the macro false 
positive, there won't be an open paren after the closing paren, right?



================
Comment at: lib/Format/TokenAnnotator.cpp:155
+           Next->startsSequence(tok::identifier, tok::l_square,
+                                tok::numeric_constant, tok::r_square,
+                                tok::r_paren, tok::l_paren))) {
----------------
This seems suspect. Does it have to be a numeric_constant?


================
Comment at: unittests/Format/FormatTest.cpp:12029
+  EXPECT_EQ(FormatStyle::LK_Cpp, guessLanguage("foo.h", "FOO(^);"));
+  EXPECT_EQ(FormatStyle::LK_ObjC,
+            guessLanguage("foo.h", "int(^)(char, float);"));
----------------
I am somewhat skeptical about all these tests now being solely about 
guessLanguage. It might be the best choice for some of them, but also, there 
might be other things we do to detect ObjC at some point and then all of these 
tests become meaningless.

Does your change create a different formatting here?


Repository:
  rC Clang

https://reviews.llvm.org/D43906



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to