summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index ff437f119e9..af03696cf89 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -1440,7 +1440,9 @@ private:
"NSAffineTransform",
"NSArray",
"NSAttributedString",
+ "NSBundle",
"NSCache",
+ "NSCalendar",
"NSCharacterSet",
"NSCountedSet",
"NSData",
@@ -1466,6 +1468,7 @@ private:
"NSMutableString",
"NSNumber",
"NSNumberFormatter",
+ "NSObject",
"NSOrderedSet",
"NSPoint",
"NSPointerArray",
@@ -1475,17 +1478,19 @@ private:
"NSSet",
"NSSize",
"NSString",
+ "NSTimeZone",
"NSUInteger",
"NSURL",
"NSURLComponents",
"NSURLQueryItem",
"NSUUID",
+ "NSValue",
};
for (auto &Line : AnnotatedLines) {
- for (FormatToken *FormatTok = Line->First->Next; FormatTok;
+ for (FormatToken *FormatTok = Line->First; FormatTok;
FormatTok = FormatTok->Next) {
- if ((FormatTok->Previous->is(tok::at) &&
+ if ((FormatTok->Previous && FormatTok->Previous->is(tok::at) &&
(FormatTok->isObjCAtKeyword(tok::objc_interface) ||
FormatTok->isObjCAtKeyword(tok::objc_implementation) ||
FormatTok->isObjCAtKeyword(tok::objc_protocol) ||
OpenPOWER on IntegriCloud