Skip to content

Commit 74cf5eb

Browse files
Update tokenize.cpp
1 parent a27b921 commit 74cf5eb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/tokenize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9528,12 +9528,12 @@ void Tokenizer::simplifyCPPAttribute()
95289528
head = skipCPPOrAlignAttribute(head)->next();
95299529
while (Token::Match(head, "%name%|::|*|&|<|>|,")) // skip return type
95309530
head = head->next();
9531-
if (head && head->str() == "(" && TokenList::isFunctionHead(head, "{;__attribute__")) {
9531+
if (head && head->str() == "(" && (TokenList::isFunctionHead(head, "{;") || Token::Match(head->link(), ") __attribute__"))) {
95329532
head->previous()->isAttributeNoreturn(true);
95339533
}
95349534
} else if (Token::findsimplematch(tok->tokAt(2), "nodiscard", tok->link())) {
95359535
Token * head = skipCPPOrAlignAttribute(tok)->next();
9536-
while (isCPPAttribute(head) || isAlignAttribute(head))
9536+
while (isCPPAttribute(head) || isAlignAttribute(head))
95379537
head = skipCPPOrAlignAttribute(head)->next();
95389538
while (Token::Match(head, "%name%|::|*|&|<|>|,"))
95399539
head = head->next();

0 commit comments

Comments
 (0)