From f7b48b63426e7442a81ac0ce88eb135638b73d11 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Mon, 7 Jan 2013 14:52:14 +0000 Subject: [PATCH] Make clang-format binary understand C++11. llvm-svn: 171736 --- clang-tools-extra/clang-format/ClangFormat.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang-tools-extra/clang-format/ClangFormat.cpp b/clang-tools-extra/clang-format/ClangFormat.cpp index b0117dca43e2..0f7a33c06dab 100644 --- a/clang-tools-extra/clang-format/ClangFormat.cpp +++ b/clang-tools-extra/clang-format/ClangFormat.cpp @@ -57,8 +57,10 @@ static void format() { 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);