[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

Michael Spencer via cfe-commits cfe-commits at lists.llvm.org
Mon May 6 13:28:24 PDT 2024


Bigcheese wrote:

> The paper does not clearly says whether disallow function-like macro is also needed, but I think disallow function-like macro has the same goal as the paper. WDYT? @cor3ntin @ChuanqiXu9
> 
> The wording in the paper said: _No identifier in the pp-module-name or pp-module-partition shall currently be defined as an **object-like macro**._

The "where the pp-tokens (if any) shall not begin with a ( preprocessing token" prohibits function like macros already. The goal was to restrict only what was needed. So identifiers defined as function like macros are ok as long as it's not followed by `(`.

https://github.com/llvm/llvm-project/pull/90574


More information about the cfe-commits mailing list