diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-10 13:09:09 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-10 13:09:09 +0000 |
commit | d730914a6b66746597aa48de8788f20ef3dfd9c1 (patch) | |
tree | ad2c09f67c10e47633e4493430a57591281102bf /clang-format | |
parent | 125bf8be64bfe2eb0e93b6b157585878e776055c (diff) |
Let clang-format binary use same LangOpts as test.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@172066 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-format')
-rw-r--r-- | clang-format/ClangFormat.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/clang-format/ClangFormat.cpp b/clang-format/ClangFormat.cpp index e2dceb94..21069a49 100644 --- a/clang-format/ClangFormat.cpp +++ b/clang-format/ClangFormat.cpp @@ -65,12 +65,7 @@ static void format() { } 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; - LangOpts.ObjC1 = 1; - LangOpts.ObjC2 = 1; - Lexer Lex(ID, Sources.getBuffer(ID), Sources, LangOpts); + Lexer Lex(ID, Sources.getBuffer(ID), Sources, getFormattingLangOpts()); SourceLocation Start = Sources.getLocForStartOfFile(ID).getLocWithOffset(Offset); SourceLocation End = Sources.getLocForEndOfFile(ID); |