[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-21 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328175: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic (authored by benhamilton, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-21 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139410. benhamilton marked an inline comment as done. benhamilton added a comment. Remove assert Repository: rC Clang https://reviews.llvm.org/D44632 Files: lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index:

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-21 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. Looks good. 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

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-21 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak 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", krasimir wrote: > jolesiak

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir 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", jolesiak wrote: > benhamilton

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak accepted this revision. jolesiak added inline comments. This revision is now accepted and ready to land. Comment at: lib/Format/Format.cpp:1450 // Keep this array sorted, since we are binary searching over it. static constexpr llvm::StringLiteral

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked 4 inline comments as done. benhamilton 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[] = {

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139136. benhamilton added a comment. Add assert(std::is_sorted(...)). (We can't static_assert on is_sorted until C++2x.) Repository: rC Clang https://reviews.llvm.org/D44632 Files: lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index:

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Daniel Jasper via Phabricator via cfe-commits
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", benhamilton wrote: > jolesiak

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a subscriber: krasimir. benhamilton added a comment. @krasimir, can you answer @djasper's question about hash set vs. binary search? Comment at: lib/Format/Format.cpp:1450 // Keep this array sorted, since we are binary searching over it. static

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139125. benhamilton marked 2 inline comments as done. benhamilton added a comment. clang-format Repository: rC Clang https://reviews.llvm.org/D44632 Files: lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index:

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak 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", djasper wrote: > I have

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Daniel Jasper via Phabricator via cfe-commits
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

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-20 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak requested changes to this revision. jolesiak added inline comments. This revision now requires changes to proceed. Comment at: unittests/Format/FormatTest.cpp:12099 EXPECT_EQ(FormatStyle::LK_ObjC, guessLanguage("foo", "@interface Foo\n@end\n")); +

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-19 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: jolesiak, djasper. Herald added subscribers: cfe-commits, klimek. We received reports of the Objective-C style guesser getting a false negative on header files like: CGSize SizeOfThing(MyThing thing); This adds more Core Graphics