Skip to content

Commit df397a9

Browse files
author
Galen Elias
committed
PR comment cleanup
1 parent 549d778 commit df397a9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

clang/lib/Format/UnwrappedLineFormatter.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,12 @@ class LineJoiner {
365365
// FIXME: There are probably cases where we should use FirstNonComment
366366
// instead of TheLine->First.
367367

368-
if (TheLine->Last->is(tok::l_brace)) {
369-
if (Style.AllowShortNamespacesOnASingleLine &&
370-
TheLine->First->is(tok::kw_namespace)) {
371-
unsigned result = tryMergeNamespace(I, E, Limit);
372-
if (result > 0)
373-
return result;
374-
}
368+
if (Style.AllowShortNamespacesOnASingleLine &&
369+
TheLine->First->is(tok::kw_namespace) &&
370+
TheLine->Last->is(tok::l_brace)) {
371+
const auto result = tryMergeNamespace(I, E, Limit);
372+
if (result > 0)
373+
return result;
375374
}
376375

377376
if (Style.CompactNamespaces) {

0 commit comments

Comments
 (0)