Skip to content
Snippets Groups Projects
Commit d0af4b46 authored by Nico Weber's avatar Nico Weber
Browse files

Formatter: Don't put spaces betwen @ and objc keywords.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171753 91177308-0d34-0410-b5e6-96231b3b80d8
parent 4a293a2e
No related branches found
No related tags found
Loading
......@@ -946,6 +946,8 @@ private:
(Left.isNot(tok::identifier) && Left.isNot(tok::kw_sizeof) &&
Left.isNot(tok::kw_typeof) && Left.isNot(tok::kw_alignof));
}
if (Left.is(tok::at) && Right.getObjCKeywordID() != tok::objc_not_keyword)
return false;
return true;
}
......
......@@ -1022,10 +1022,9 @@ TEST_F(FormatTest, FormatForObjectiveCMethodDecls) {
}
TEST_F(FormatTest, ObjCAt) {
// FIXME: Make the uncommented lines pass.
verifyFormat("@autoreleasepool");
//verifyFormat("@catch");
//verifyFormat("@class");
verifyFormat("@catch");
verifyFormat("@class");
verifyFormat("@compatibility_alias");
verifyFormat("@defs");
verifyFormat("@dynamic");
......@@ -1037,17 +1036,17 @@ TEST_F(FormatTest, ObjCAt) {
verifyFormat("@interface");
verifyFormat("@optional");
verifyFormat("@package");
//verifyFormat("@private");
verifyFormat("@private");
verifyFormat("@property");
//verifyFormat("@protected");
verifyFormat("@protected");
verifyFormat("@protocol");
//verifyFormat("@public");
verifyFormat("@public");
verifyFormat("@required");
verifyFormat("@selector");
verifyFormat("@synchronized");
verifyFormat("@synthesize");
//verifyFormat("@throw");
//verifyFormat("@try");
verifyFormat("@throw");
verifyFormat("@try");
EXPECT_EQ("@interface", format("@ interface"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment