diff options
author | Daniel Jasper <djasper@google.com> | 2013-03-19 18:33:58 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-03-19 18:33:58 +0000 |
commit | c30eb51b639e132af458fbf7647eefae6edb93ac (patch) | |
tree | d0724c5eafeec3251d6a21294aed2ead9b191da1 /lib/Format/UnwrappedLineParser.cpp | |
parent | fd44d34ab626a19819ad0e87a03e4bf014ec94fd (diff) |
Fix indentation for case: // comment.
Before:
switch (x) {
case 1:
// Do amazing stuff
{
g();
f();
}
}
After:
switch (x) {
case 1:
// Do amazing stuff
{
g();
f();
}
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177420 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | lib/Format/UnwrappedLineParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index cdd77759fd..a438a53c37 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp @@ -576,7 +576,7 @@ void UnwrappedLineParser::parseLabel() { unsigned OldLineLevel = Line->Level; if (Line->Level > 0) --Line->Level; - if (FormatTok.Tok.is(tok::l_brace)) { + if (CommentsBeforeNextToken.empty() && FormatTok.Tok.is(tok::l_brace)) { parseBlock(/*MustBeDeclaration=*/ false); if (FormatTok.Tok.is(tok::kw_break)) parseStructuralElement(); // "break;" after "}" goes on the same line. |