Support trailing semicolon in .x foo.C(12);

This commit is contained in:
Axel Naumann 2019-05-14 18:06:46 +02:00 committed by SFT
parent 202a2c8e89
commit ed64547947

View File

@ -285,6 +285,11 @@ namespace cling {
llvm::StringRef file(getCurTok().getBufStart());
while (!lookAhead(forward).is(tok::eof))
++forward;
// Skip any trailing ';':
if (lookAhead(forward - 1).is(tok::semicolon))
--forward;
// Now track back to find the opening '('.
if (lookAhead(forward - 1).is(tok::r_paren)) {
// Trailing ')' - we interpret that as an argument.