[clang] [clang] Mark some language options as benign. (PR #131569)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 18 04:22:03 PDT 2025
cor3ntin wrote:
The issue is that if we allow the preprocessor's state to differ across modules, then the resulting compiled units can be arbitrary (and subtly incompatible).
I wonder if a possible solution is to record which macros are used (ie, are expanded or appear in `#ifdef` / `defined`)
And ONLY serialize the set of macros that are used.
That way, if your program never uses `__SSP__`, for example, then your module would not be incompatible just because __SPP__ has been defined.
I think that's worth pondering a bit more @Bigcheese
https://github.com/llvm/llvm-project/pull/131569
More information about the cfe-commits
mailing list