[flang][preprocessing] Allow keyword macro to rename a function-like macro
authorPeter Klausler <pklausler@nvidia.com>
Mon, 22 May 2023 20:56:32 +0000 (13:56 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 22 May 2023 21:43:45 +0000 (14:43 -0700)
commit9efe1581502f1433811ea479345f84ca5008c754
tree8264eeec829106cfd253c98942abf4e945b79d43
parentd54ad0b6cd7c7be24062014367fcd0c3f525c7ec
[flang][preprocessing] Allow keyword macro to rename a function-like macro

 #define FOO(x) ((x)+1)
 #define BAR FOO
 print *, BAR(1)

should work as one would expect.

Fixes https://github.com/llvm/llvm-project/issues/47162.

Differential Revision: https://reviews.llvm.org/D151154
flang/lib/Parser/preprocessor.cpp
flang/test/Preprocessing/renaming.F [new file with mode: 0644]