[cfe-commits] [clang-tools-extra] r171743 - /clang-tools-extra/trunk/clang-format/ClangFormat.cpp

Nico Weber nicolasweber at gmx.de
Mon Jan 7 07:21:13 PST 2013


Author: nico
Date: Mon Jan  7 09:21:13 2013
New Revision: 171743

URL: http://llvm.org/viewvc/llvm-project?rev=171743&view=rev
Log:
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'.


Modified:
    clang-tools-extra/trunk/clang-format/ClangFormat.cpp

Modified: clang-tools-extra/trunk/clang-format/ClangFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-format/ClangFormat.cpp?rev=171743&r1=171742&r2=171743&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-format/ClangFormat.cpp (original)
+++ clang-tools-extra/trunk/clang-format/ClangFormat.cpp Mon Jan  7 09:21:13 2013
@@ -61,6 +61,7 @@
   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);





More information about the cfe-commits mailing list