File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -2753,10 +2753,9 @@ class AnnotatingParser {
27532753 }
27542754
27552755 // Heuristically try to determine whether the parentheses contain a type.
2756- auto IsQualifiedPointerOrReference = [this ](FormatToken *T) {
2756+ auto IsQualifiedPointerOrReference = [](FormatToken *T, bool IsCpp ) {
27572757 // This is used to handle cases such as x = (foo *const)&y;
27582758 assert (!T->isTypeName (IsCpp) && " Should have already been checked" );
2759- (void )IsCpp; // Avoid -Wunused-lambda-capture when assertion is disabled.
27602759 // Strip trailing qualifiers such as const or volatile when checking
27612760 // whether the parens could be a cast to a pointer/reference type.
27622761 while (T) {
@@ -2789,7 +2788,7 @@ class AnnotatingParser {
27892788 !Tok.Previous ||
27902789 Tok.Previous ->isOneOf (TT_TemplateCloser, TT_TypeDeclarationParen) ||
27912790 Tok.Previous ->isTypeName (IsCpp) ||
2792- IsQualifiedPointerOrReference (Tok.Previous );
2791+ IsQualifiedPointerOrReference (Tok.Previous , IsCpp );
27932792 bool ParensCouldEndDecl =
27942793 Tok.Next ->isOneOf (tok::equal, tok::semi, tok::l_brace, tok::greater);
27952794 if (ParensAreType && !ParensCouldEndDecl)
You can’t perform that action at this time.
0 commit comments