aboutsummaryrefslogtreecommitdiff
path: root/clang-format
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-07 15:21:13 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-07 15:21:13 +0000
commit3724483b7e0c0fe36a65e164159caaadf58b1c9d (patch)
tree029ccded3a53ce702416af8598b4251e4e2f20b3 /clang-format
parent6408d5ab9153beeb111e93a8e0ed990ec21fce6a (diff)
Set LangOpts.ObjC1 to 1 in clang-format.
This matches the test change done in clang at r171742. Without this, clang-format would strip '@' characters and format e.g. '@interface' as 'interface'. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@171743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-format')
-rw-r--r--clang-format/ClangFormat.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-format/ClangFormat.cpp b/clang-format/ClangFormat.cpp
index 0f7a33c0..7a7c6c2e 100644
--- a/clang-format/ClangFormat.cpp
+++ b/clang-format/ClangFormat.cpp
@@ -61,6 +61,7 @@ static void format() {
LangOptions LangOpts;
LangOpts.CPlusPlus = 1;
LangOpts.CPlusPlus11 = 1;
+ LangOpts.ObjC1 = 1;
Lexer Lex(ID, Sources.getBuffer(ID), Sources, LangOpts);
SourceLocation Start =
Sources.getLocForStartOfFile(ID).getLocWithOffset(Offset);