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);