[PATCH] D121756: [clang-format] Clean up code looking for if statements
sstwcw via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 16 20:18:59 PDT 2022
sstwcw marked 4 inline comments as done.
sstwcw added inline comments.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:133
Left->ParentBracket != tok::less &&
- (isKeywordWithCondition(*Line.First) ||
- CurrentToken->getStartOfNonWhitespace() ==
----------------
HazardyKnusperkeks wrote:
> Any reason why one doesn't need this check anymore?
The next check already covers what the first is supposed to cover, as explained in the commit message.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:1431-1442
+ TT_AttributeMacro, TT_BracedListLBrace, TT_ClassLBrace,
+ TT_CompoundRequirementLBrace, TT_ConditionLParen, TT_EnumLBrace,
+ TT_FatArrow, TT_ForEachMacro, TT_FunctionLBrace,
+ TT_FunctionLikeOrFreestandingMacro, TT_IfMacro,
+ TT_ImplicitStringLiteral, TT_InlineASMBrace, TT_LambdaArrow,
+ TT_LambdaLBrace, TT_LambdaLSquare, TT_NamespaceMacro,
+ TT_ObjCStringLiteral, TT_OverloadedOperator, TT_RecordLBrace,
----------------
HazardyKnusperkeks wrote:
> Unrelated Change.
Sorry. This part has changed several times in the main line since I started working on this patch. After a few merge conflicts I got tired and started running sort uniq on this part.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121756/new/
https://reviews.llvm.org/D121756
More information about the cfe-commits
mailing list