[flang] Rework preprocessing of stringification
authorpeter klausler <pklausler@nvidia.com>
Thu, 17 Sep 2020 19:19:42 +0000 (12:19 -0700)
committerpeter klausler <pklausler@nvidia.com>
Fri, 18 Sep 2020 17:45:57 +0000 (10:45 -0700)
commit01def7f7c3f1f762ce57a89aceb85214669911c3
tree9e00bdd91ca5d791d2b2083c1731e558f7d25005
parent0576f436e577cede25810729aef236ec8c649446
[flang] Rework preprocessing of stringification

Hew more closely to the C17 standard; perform macro replacement
of arguments to function-like macros unless they're being stringified
or pasted.  Test with a model "assert" macro idiom that exposed
the problem.

Differential Revision: https://reviews.llvm.org/D87650
flang/lib/Parser/parsing.cpp
flang/lib/Parser/preprocessor.cpp
flang/lib/Parser/preprocessor.h
flang/lib/Parser/prescan.cpp
flang/lib/Parser/prescan.h
flang/test/Preprocessing/assert.F90 [new file with mode: 0644]