aboutsummaryrefslogtreecommitdiff
path: root/clang-format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-07 14:52:14 +0000
committerDaniel Jasper <djasper@google.com>2013-01-07 14:52:14 +0000
commit6408d5ab9153beeb111e93a8e0ed990ec21fce6a (patch)
tree0adfd3c92b2817ca8fb180f626df7957e57443c0 /clang-format
parentc27f30c16a9930494cf10f9c266946fd5d734677 (diff)
Make clang-format binary understand C++11.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@171736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-format')
-rw-r--r--clang-format/ClangFormat.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang-format/ClangFormat.cpp b/clang-format/ClangFormat.cpp
index b0117dca..0f7a33c0 100644
--- a/clang-format/ClangFormat.cpp
+++ b/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);