djasper added inline comments.

================
Comment at: lib/Format/Format.cpp:1450
     // Keep this array sorted, since we are binary searching over it.
     static constexpr llvm::StringLiteral FoundationIdentifiers[] = {
         "CGFloat",
----------------
I have concerns about this growing lists of things. Specifically:
- Keeping it sorted is a maintenance concern.
- Doing binary search for basically every identifier in a header seems an 
unnecessary waste.

Could we just create a hash set of these?


================
Comment at: unittests/Format/FormatTest.cpp:12099
   EXPECT_EQ(FormatStyle::LK_ObjC, guessLanguage("foo", "@interface 
Foo\n@end\n"));
+  EXPECT_EQ(FormatStyle::LK_ObjC, guessLanguage("foo.h", "int DoStuff(CGRect 
rect);\n"));
+  EXPECT_EQ(
----------------
jolesiak wrote:
> I know that it's violated in several places in this file (even in two of the 
> three lines above), but I feel like we should keep 80 char limit for column 
> width.
Agreed. Please format this file with clang-format.


Repository:
  rC Clang

https://reviews.llvm.org/D44632



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

Reply via email to