diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp')
| -rw-r--r-- | contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp index 73840332e22c..4a1fc08455e5 100644 --- a/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/contrib/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -3178,6 +3178,12 @@ static bool isFunctionDeclarationName(bool IsCpp, const FormatToken &Current, !Previous->isOneOf(tok::kw_return, tok::kw_co_return)) { return true; } + if (Previous->is(tok::r_paren) && Previous->is(TT_TypeDeclarationParen)) { + assert(Previous->MatchingParen); + assert(Previous->MatchingParen->is(tok::l_paren)); + assert(Previous->MatchingParen->is(TT_TypeDeclarationParen)); + return true; + } if (!Previous->isOneOf(tok::star, tok::amp, tok::ampamp, TT_TemplateCloser)) return false; Next = skipOperatorName(Next); |
