@@ -2093,18 +2093,16 @@ class AnnotatingParser {
2093
2093
!Current.Next ->isOneOf (tok::semi, tok::colon, tok::l_brace,
2094
2094
tok::comma, tok::period, tok::arrow,
2095
2095
tok::coloncolon, tok::kw_noexcept)) {
2096
- if (FormatToken *AfterParen = Current.MatchingParen ->Next ) {
2097
- // Make sure this isn't the return type of an Obj-C block declaration
2098
- if (AfterParen->isNot (tok::caret)) {
2099
- if (FormatToken *BeforeParen = Current.MatchingParen ->Previous ) {
2100
- if (BeforeParen->is (tok::identifier) &&
2101
- BeforeParen->isNot (TT_TypenameMacro) &&
2102
- BeforeParen->TokenText == BeforeParen->TokenText .upper () &&
2103
- (!BeforeParen->Previous ||
2104
- BeforeParen->Previous ->ClosesTemplateDeclaration )) {
2105
- Current.setType (TT_FunctionAnnotationRParen);
2106
- }
2107
- }
2096
+ if (FormatToken *AfterParen = Current.MatchingParen ->Next ;
2097
+ AfterParen && AfterParen->isNot (tok::caret)) {
2098
+ // Make sure this isn't the return type of an Obj-C block declaration.
2099
+ if (FormatToken *BeforeParen = Current.MatchingParen ->Previous ;
2100
+ BeforeParen && BeforeParen->is (tok::identifier) &&
2101
+ BeforeParen->isNot (TT_TypenameMacro) &&
2102
+ BeforeParen->TokenText == BeforeParen->TokenText .upper () &&
2103
+ (!BeforeParen->Previous ||
2104
+ BeforeParen->Previous ->ClosesTemplateDeclaration )) {
2105
+ Current.setType (TT_FunctionAnnotationRParen);
2108
2106
}
2109
2107
}
2110
2108
}
0 commit comments