[PATCH] D145262: [clang-format] Treat AttributeMacros more like attribute macros
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun May 7 12:55:22 PDT 2023
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:4514-4515
+ // Apply this logic for parens that are not function attribute macros.
+ if ((Left.is(tok::r_paren) && Left.isNot(TT_AttributeParen)) &&
+ canBeObjCSelectorComponent(Right)) {
// Don't space between ')' and <id> or ')' and 'new'. 'new' is not a
----------------
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:5473
+ if (Right.isOneOf(tok::kw___attribute, TT_AttributeMacro))
+ return true;
+
----------------
Does changing this return value make no difference? In other words is there no combination of `Left.is(TT_AttributeSquare)` and `Right.is(tok::kw___attribute)`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145262/new/
https://reviews.llvm.org/D145262
More information about the cfe-commits
mailing list