[PATCH] D57906: [CTU] Do not allow different CPP dialects in CTU
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 11 05:24:23 PST 2019
martong added a comment.
> How is #if __cplusplus >= 201103L qualitatively different from #ifndef NDEBUG or #if MYLIB_ABI_VERSION==2 or #if __DATE__ == "2018-04-01"?
Ideally, all macros should be the same in the two TUs... If we were very strict then we could check for that, but that might be just too strict.
If there is an ODR error (either because of a macro mismatch or for other reasons) then structural equivalency will diagnose that, but may be nontrivial for the user to identify what causes the ODR error.
Checking the language and the language dialect is easy and it prevents such disturbing errors early.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57906/new/
https://reviews.llvm.org/D57906
More information about the cfe-commits
mailing list