Skip to content

Commit 1346788

Browse files
committed
Fixup comments
1 parent 1b4f84f commit 1346788

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

clang/lib/Format/Format.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1589,9 +1589,9 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) {
15891589
LLVMStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All;
15901590
LLVMStyle.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_Never;
15911591
LLVMStyle.AllowShortLambdasOnASingleLine = FormatStyle::SLS_All;
1592-
LLVMStyle.AllowShortRecordOnASingleLine = FormatStyle::SRS_EmptyIfAttached;
15931592
LLVMStyle.AllowShortLoopsOnASingleLine = false;
15941593
LLVMStyle.AllowShortNamespacesOnASingleLine = false;
1594+
LLVMStyle.AllowShortRecordOnASingleLine = FormatStyle::SRS_EmptyIfAttached;
15951595
LLVMStyle.AlwaysBreakAfterDefinitionReturnType = FormatStyle::DRTBS_None;
15961596
LLVMStyle.AlwaysBreakBeforeMultilineStrings = false;
15971597
LLVMStyle.AttributeMacros.push_back("__capability");

clang/lib/Format/TokenAnnotator.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5962,13 +5962,12 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line,
59625962
// Don't attempt to interpret record return types as records.
59635963
// FIXME: Not covered by tests.
59645964
if (Right.isNot(TT_FunctionLBrace)) {
5965-
return ((Line.startsWith(tok::kw_class) &&
5966-
Style.BraceWrapping.AfterClass) ||
5967-
(Line.startsWith(tok::kw_struct) &&
5968-
Style.BraceWrapping.AfterStruct) ||
5969-
(Line.startsWith(tok::kw_union) &&
5970-
Style.BraceWrapping.AfterUnion)) &&
5971-
Style.AllowShortRecordOnASingleLine == FormatStyle::SRS_Never;
5965+
return Style.AllowShortRecordOnASingleLine == FormatStyle::SRS_Never &&
5966+
(Line.startsWith(tok::kw_class) &&
5967+
Style.BraceWrapping.AfterClass) ||
5968+
(Line.startsWith(tok::kw_struct) &&
5969+
Style.BraceWrapping.AfterStruct) ||
5970+
(Line.startsWith(tok::kw_union) && Style.BraceWrapping.AfterUnion);
59725971
}
59735972
}
59745973

clang/lib/Format/UnwrappedLineFormatter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "FormatToken.h"
1111
#include "NamespaceEndCommentsFixer.h"
1212
#include "WhitespaceManager.h"
13-
#include "clang/Basic/TokenKinds.h"
1413
#include "llvm/Support/Debug.h"
1514
#include <queue>
1615

0 commit comments

Comments
 (0)