@@ -9928,9 +9928,9 @@ static bool isAlignAttribute(const Token * tok)
99289928
99299929static const Token* skipCPPOrAlignAttribute (const Token * tok)
99309930{
9931- if (isCPPAttribute (tok)) {
9931+ if (isCPPAttribute (tok)) {
99329932 return tok->link ();
9933- }else if (isAlignAttribute (tok)) {
9933+ } else if (isAlignAttribute (tok)) {
99349934 return tok->next ()->link ();
99359935 }
99369936 return tok;
@@ -10199,7 +10199,7 @@ void Tokenizer::findGarbageCode() const
1019910199 continue ;
1020010200 }
1020110201 // skip C++ attributes [[...]]
10202- if (isCPP11 && (isCPPAttribute (tok) || isAlignAttribute (tok)) ) {
10202+ if (isCPP11 && (isCPPAttribute (tok) || isAlignAttribute (tok))) {
1020310203 tok = skipCPPOrAlignAttribute (tok);
1020410204 continue ;
1020510205 }
@@ -10842,10 +10842,10 @@ void Tokenizer::simplifyCPPAttribute()
1084210842 return ;
1084310843
1084410844 for (Token *tok = list.front (); tok; tok = tok->next ()) {
10845- if (!isCPPAttribute (tok) && !isAlignAttribute (tok)){
10845+ if (!isCPPAttribute (tok) && !isAlignAttribute (tok)) {
1084610846 continue ;
1084710847 }
10848- if (isCPPAttribute (tok)){
10848+ if (isCPPAttribute (tok)) {
1084910849 if (Token::findsimplematch (tok->tokAt (2 ), " noreturn" , tok->link ())) {
1085010850 const Token * head = skipCPPOrAlignAttribute (tok);
1085110851 while (isCPPAttribute (head) || isAlignAttribute (head))
@@ -10854,7 +10854,7 @@ void Tokenizer::simplifyCPPAttribute()
1085410854 while (Token::Match (head, " %name%|::|*|&|<|>|," )) // skip return type
1085510855 head = head->next ();
1085610856 if (head && head->str () == " (" && isFunctionHead (head, " {|;" )) {
10857- head->previous ()->isAttributeNoreturn (true );
10857+ head->previous ()->isAttributeNoreturn (true );
1085810858 }
1085910859 } else if (Token::findsimplematch (tok->tokAt (2 ), " nodiscard" , tok->link ())) {
1086010860 const Token * head = skipCPPOrAlignAttribute (tok);
@@ -10864,7 +10864,7 @@ void Tokenizer::simplifyCPPAttribute()
1086410864 while (Token::Match (head, " %name%|::|*|&|<|>|," ))
1086510865 head = head->next ();
1086610866 if (head && head->str () == " (" && isFunctionHead (head, " {|;" )) {
10867- head->previous ()->isAttributeNodiscard (true );
10867+ head->previous ()->isAttributeNodiscard (true );
1086810868 }
1086910869 } else if (Token::findsimplematch (tok->tokAt (2 ), " maybe_unused" , tok->link ())) {
1087010870 const Token* head = skipCPPOrAlignAttribute (tok);
@@ -10901,10 +10901,10 @@ void Tokenizer::simplifyCPPAttribute()
1090110901 }
1090210902 Token::eraseTokens (tok, skipCPPOrAlignAttribute (tok)->next ());
1090310903 // fix iterator after removing
10904- if (tok->previous ()){
10904+ if (tok->previous ()) {
1090510905 tok = tok->previous ();
1090610906 tok->next ()->deleteThis ();
10907- }else {
10907+ } else {
1090810908 tok->deleteThis ();
1090910909 tok = list.front ();
1091010910 }
0 commit comments