[clang] [clang-format] add option to control bin-packing keyworded parameters (PR #131605)
Eugene Shalygin via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 31 01:32:36 PDT 2025
================
@@ -3783,10 +3823,20 @@ void TokenAnnotator::annotate(AnnotatedLine &Line) {
static bool isFunctionDeclarationName(const LangOptions &LangOpts,
const FormatToken &Current,
const AnnotatedLine &Line,
+ const FormatStyle &Style,
FormatToken *&ClosingParen) {
if (Current.is(TT_FunctionDeclarationName))
return true;
+ if (Current.is(TT_FunctionLikeOrFreestandingMacro) &&
+ std::find_if(
+ Style.KeywordedFunctionLikeMacros.begin(),
+ Style.KeywordedFunctionLikeMacros.end(),
+ [&Current](const FormatStyle::KeywordedFunctionLikeMacro &Decl) {
+ return Current.TokenText == Decl.Name;
+ }) != Style.KeywordedFunctionLikeMacros.end()) {
+ return true;
+ }
----------------
zeule wrote:
It is not necessary; undone. Thank you!
https://github.com/llvm/llvm-project/pull/131605
More information about the cfe-commits
mailing list