Make clang-format binary understand C++11.

llvm-svn: 171736
This commit is contained in:
Daniel Jasper 2013-01-07 14:52:14 +00:00
parent 26c59fa870
commit f7b48b6342
1 changed files with 2 additions and 0 deletions

View File

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