[cfe-commits] [clang-tools-extra] r171736 - /clang-tools-extra/trunk/clang-format/ClangFormat.cpp
Daniel Jasper
djasper at google.com
Mon Jan 7 06:52:14 PST 2013
Author: djasper
Date: Mon Jan 7 08:52:14 2013
New Revision: 171736
URL: http://llvm.org/viewvc/llvm-project?rev=171736&view=rev
Log:
Make clang-format binary understand C++11.
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=171736&r1=171735&r2=171736&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-format/ClangFormat.cpp (original)
+++ clang-tools-extra/trunk/clang-format/ClangFormat.cpp Mon Jan 7 08:52:14 2013
@@ -57,8 +57,10 @@
return;
}
FileID ID = createInMemoryFile(Code.get(), Sources, Files);
+ // FIXME: Pull this out into a common method and use here and in the tests.
LangOptions LangOpts;
LangOpts.CPlusPlus = 1;
+ LangOpts.CPlusPlus11 = 1;
Lexer Lex(ID, Sources.getBuffer(ID), Sources, LangOpts);
SourceLocation Start =
Sources.getLocForStartOfFile(ID).getLocWithOffset(Offset);
More information about the cfe-commits
mailing list