summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorBen Hamilton <benhamilton@google.com>2018-03-22 03:25:22 +0000
committerBen Hamilton <benhamilton@google.com>2018-03-22 03:25:22 +0000
commit19c782d5200becc61e18922a689f778bf5a1a0cc (patch)
tree613c78f80d528d35d9e8a39ebd1510eda41abd3f /clang/lib/Format/Format.cpp
parent5f91134344114826644b920d6fd5ec5b88ca47cb (diff)
downloadbcm5719-llvm-19c782d5200becc61e18922a689f778bf5a1a0cc.tar.gz
bcm5719-llvm-19c782d5200becc61e18922a689f778bf5a1a0cc.zip
[clang-format] Add a few more Core Graphics identifiers to ObjC heuristic
Summary: 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 identifiers to the Objective-C style guesser. Test Plan: New tests added. Ran tests with: % make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: jolesiak, djasper Reviewed By: jolesiak, djasper Subscribers: krasimir, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D44632 llvm-svn: 328175
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 69b3881a7ac..e9d1fafe860 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -1449,6 +1449,19 @@ private:
// Keep this array sorted, since we are binary searching over it.
static constexpr llvm::StringLiteral FoundationIdentifiers[] = {
"CGFloat",
+ "CGPoint",
+ "CGPointMake",
+ "CGPointZero",
+ "CGRect",
+ "CGRectEdge",
+ "CGRectInfinite",
+ "CGRectMake",
+ "CGRectNull",
+ "CGRectZero",
+ "CGSize",
+ "CGSizeMake",
+ "CGVector",
+ "CGVectorMake",
"NSAffineTransform",
"NSArray",
"NSAttributedString",
@@ -1497,6 +1510,8 @@ private:
"NSURLQueryItem",
"NSUUID",
"NSValue",
+ "UIImage",
+ "UIView",
};
for (auto &Line : AnnotatedLines) {
OpenPOWER on IntegriCloud