[clang] [NFC] Move RegisterBuiltinMacro function into the Preprocessor class (PR #100142)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 12:52:12 PDT 2024


muiez wrote:

> This does feel like it could be useful, but do you need this (or anticipate that you’ll be needing this) for anything in particular elswhere?

Yes, we will need this to conditionally register a builtin macro during the Lexing phase, to be expanded correctly during the preprocessor output (with `-E`). In particular, we anticipate having a builtin macro that should only be defined when a specific pragma is defined. This change allows for that, and improves code quality.

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


More information about the cfe-commits mailing list