Also set ObjC1 in the formatter tests.
The only effect of this flag in the lexer is that '@' now gets turned into
tok::at instead of tok::unknown.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171742
91177308-0d34-0410-b5e6-
96231b3b80d8
LangOptions LangOpts;
LangOpts.CPlusPlus = 1;
LangOpts.CPlusPlus11 = 1;
+ LangOpts.ObjC1 = 1;
Lexer Lex(ID, Context.Sources.getBuffer(ID), Context.Sources, LangOpts);
tooling::Replacements Replace = reformat(Style, Lex, Context.Sources,
Ranges);
"outRange8:(NSRange) out_range8 outRange9:(NSRange) out_range9;"));
}
+TEST_F(FormatTest, DoNotDropAt) {
+ verifyFormat("@interface");
+ verifyFormat("@dynamic");
+}
+
} // end namespace tooling
} // end namespace clang