aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2012-12-06 18:03:27 +0000
committerAlexander Kornienko <alexfh@google.com>2012-12-06 18:03:27 +0000
commit15757316d67cb7a854d53a0402d67ad58347600a (patch)
treefc3e055fa4fbe5539cab47209eb3840611a6a971 /lib/Format/Format.cpp
parent762661a077ffa73580d556a9dd149830662d972e (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 51db69c5ae..ebb49498da 100644
--- a/lib/Format/Format.cpp
+++ b/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();