Skip to content

Commit 65dfba6

Browse files
committed
Drop a redundant ( check in Macro::expand()
The early return above it already leaves expand() for a function-like macro whose next token is not (, so the test is always true there.
1 parent 5beedaf commit 65dfba6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎simplecpp.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2409,7 +2409,7 @@ namespace simplecpp {
24092409
const bool calledInDefine = (loc.fileIndex != nameTokInst->location.fileIndex ||
24102410
loc.line < nameTokInst->location.line);
24112411

2412-
if (functionLike() && nameTokInst->next && nameTokInst->next->op == '(' && isIntegerConstantMacro(name()))
2412+
if (functionLike() && nameTokInst->next && isIntegerConstantMacro(name()))
24132413
usageList.back().arg = writtenArgument(nameTokInst, calledInDefine);
24142414

24152415
std::vector<const Token*> parametertokens1(getMacroParameters(nameTokInst, calledInDefine));

0 commit comments

Comments
 (0)