Skip to content

Commit 7497ccb

Browse files
committed
Fix #13735 AST:function name in parantheses
- simplifyParenthesizedLibraryFunctions: Don't abort removal when preceeding is a keyword
1 parent 380cf9a commit 7497ccb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/tokenize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3790,7 +3790,7 @@ void Tokenizer::simplifyParenthesizedLibraryFunctions()
37903790
if (!Token::simpleMatch(tok, ") ("))
37913791
continue;
37923792
Token *rpar = tok, *lpar = tok->link();
3793-
if (!lpar || Token::Match(lpar->previous(), "%name%"))
3793+
if (!lpar || (Token::Match(lpar->previous(), "%name%") && !lpar->previous()->isKeyword()))
37943794
continue;
37953795
const Token *ftok = rpar->previous();
37963796
if (mSettings.library.isNotLibraryFunction(ftok))

0 commit comments

Comments
 (0)