diff options
| author | Alexander Kornienko <alexfh@google.com> | 2012-12-06 18:03:27 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2012-12-06 18:03:27 +0000 |
| commit | 578fdd8968503056dc4bd8d7664281cd3e3595e0 (patch) | |
| tree | 3e09b82e7993485e0ff9500b0f4907123412b056 /clang/lib/Format/Format.cpp | |
| parent | a14523f11c4634ad9b1ee780dd4600f82f1814e9 (diff) | |
| download | bcm5719-llvm-578fdd8968503056dc4bd8d7664281cd3e3595e0.tar.gz bcm5719-llvm-578fdd8968503056dc4bd8d7664281cd3e3595e0.zip | |
Clang-format: IndentCaseLabels option, proper namespace handling
Summary: + tests arranged in groups, as their number is already quite large.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D185
llvm-svn: 169520
Diffstat (limited to 'clang/lib/Format/Format.cpp')
| -rw-r--r-- | clang/lib/Format/Format.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 51db69c5ae6..ebb49498da1 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -57,6 +57,7 @@ FormatStyle getLLVMStyle() { LLVMStyle.PointerAndReferenceBindToType = false; LLVMStyle.AccessModifierOffset = -2; LLVMStyle.SplitTemplateClosingGreater = true; + LLVMStyle.IndentCaseLabels = false; return LLVMStyle; } @@ -67,6 +68,7 @@ FormatStyle getGoogleStyle() { GoogleStyle.PointerAndReferenceBindToType = true; GoogleStyle.AccessModifierOffset = -1; GoogleStyle.SplitTemplateClosingGreater = false; + GoogleStyle.IndentCaseLabels = true; return GoogleStyle; } @@ -760,7 +762,7 @@ public: } tooling::Replacements format() { - UnwrappedLineParser Parser(Lex, SourceMgr, *this); + UnwrappedLineParser Parser(Style, Lex, SourceMgr, *this); StructuralError = Parser.parse(); for (std::vector<UnwrappedLine>::iterator I = UnwrappedLines.begin(), E = UnwrappedLines.end(); |

