[flang] Fix f90_correct test failure

Original-commit: flang-compiler/f18@ff7a5af50b
Reviewed-on: https://github.com/flang-compiler/f18/pull/438
This commit is contained in:
peter klausler 2019-05-02 15:19:37 -07:00
parent b3682933f3
commit 14b5cdd4d0
1 changed files with 4 additions and 2 deletions

View File

@ -319,8 +319,10 @@ std::optional<TokenSequence> Preprocessor::MacroReplacement(
}
}
}
if (argStart.size() == 1 && argStart[0] == k) {
// empty parentheses, no arguments
if (argStart.size() == 1 && k == argStart[0] &&
def.argumentCount() == 0) {
// Subtle: () is zero arguments, not one empty argument,
// unless one argument was expected.
argStart.clear();
}
if (k >= tokens || argStart.size() < def.argumentCount() ||