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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to