OSDN Git Service

[flang] Fix source line continuation in potential macro calls (bugzilla 46768)
authorpeter klausler <pklausler@nvidia.com>
Wed, 22 Jul 2020 00:57:06 +0000 (17:57 -0700)
committerpeter klausler <pklausler@nvidia.com>
Wed, 22 Jul 2020 01:21:35 +0000 (18:21 -0700)
commit320389e849f82403049c76ef06d11bfcef7b82e3
treef69c5f1257a07cd81c54acb0e7f3db7ddbef24de
parent8f2c5c4314f2360bf35d54507a54a5b612a41082
[flang] Fix source line continuation in potential macro calls (bugzilla 46768)

The prescanner looks for implicit continuation lines when
there are unclosed parentheses at the end of a line, so that
source preprocessing macro references with arguments that span
lines are recognized.  The condition that determines this
implicit continuation has been put into a predicate member
function and corrected to apply only when the following line
is source (not a preprocessing directive, comment, &c.).

Fixes bugzilla #46768.

Reviewed By: sscalpone

Differential Revision: https://reviews.llvm.org/D84280
flang/lib/Parser/prescan.cpp
flang/lib/Parser/prescan.h
flang/test/Parser/continuation-in-if.f [new file with mode: 0644]