anonymouspc wrote: > Can you elaborate on the motivation for this? What are some scenarios in > which it's necessary or important for a user to distinguish between macros > defined in source code and macros defined on the command-line?
- **header-defined** macros, such as - `stdin`, `offsetof` - `UINT8_MAX` - `BOOST_FUSION_ADAPT_STRUCT`, `BOOST_PP_REPEAT` - `__cpp_concepts`, `__cpp_lib_ranges`. They are **always defined** in different build type. Editor/IDEs can always render `#ifdef __cpp_concepts` gray when `-std=c++17`. - **command-line-defined** macros, such as - `DEBUG`, `NDEBUG` - `PKG_STATIC`, `PKG_SHARED`, They are often **defined in certain build type**. Even if `NDEBUG` is not defined, Editor/IDEs should not render the code between `#ifndef NDEBUG` gray. https://github.com/llvm/llvm-project/pull/175495 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
