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 | 2bd32ca92a1782fa2938b49993812750d90c0a9b (patch) | |
| tree | aa7dc280eb5c7d17263c5a8b61ba2dad8dbee98a /clang/lib/Format | |
| parent | 6a38438e557b72593889f34f73f06ac8e48809ba (diff) | |
| download | bcm5719-llvm-2bd32ca92a1782fa2938b49993812750d90c0a9b.tar.gz bcm5719-llvm-2bd32ca92a1782fa2938b49993812750d90c0a9b.zip | |
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();
}
}
llvm-svn: 177420
Diffstat (limited to 'clang/lib/Format')
| -rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index cdd77759fd2..a438a53c370 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/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. |

