diff options
author | Owen Pan <owenpiano@gmail.com> | 2025-05-19 01:29:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-19 01:29:16 -0700 |
commit | 0cac25bcf5a246eb8a1f02d5041731ae9a6f00e0 (patch) | |
tree | 981f430d8d3352239d64f2d4093c3ecf867fda25 /clang/lib/Format/ContinuationIndenter.cpp | |
parent | dc0dcab397ae3de38141e1995e4b4e5e3bb98660 (diff) | |
download | llvm-0cac25bcf5a246eb8a1f02d5041731ae9a6f00e0.zip llvm-0cac25bcf5a246eb8a1f02d5041731ae9a6f00e0.tar.gz llvm-0cac25bcf5a246eb8a1f02d5041731ae9a6f00e0.tar.bz2 |
[clang-format] Fix the indent of StartOfName after AttributeMacro (#140361)
Fix #139510
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index 55e1d1c..4e4e48f9 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -1475,7 +1475,9 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) { (PreviousNonComment->ClosesTemplateDeclaration || PreviousNonComment->ClosesRequiresClause || (PreviousNonComment->is(TT_AttributeMacro) && - Current.isNot(tok::l_paren)) || + Current.isNot(tok::l_paren) && + !Current.endsSequence(TT_StartOfName, TT_AttributeMacro, + TT_PointerOrReference)) || PreviousNonComment->isOneOf( TT_AttributeRParen, TT_AttributeSquare, TT_FunctionAnnotationRParen, TT_JavaAnnotation, TT_LeadingJavaAnnotation))) || |