[PATCH] D57906: [CTU] Do not allow different CPP dialects in CTU

Rafael Stahl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 8 07:33:10 PST 2019

r.stahl added inline comments.

Comment at: lib/CrossTU/CrossTranslationUnit.cpp:255
+  // in the other unit it has none.
+  if (LangTo.CPlusPlus11 != LangFrom.CPlusPlus11 ||
+      LangTo.CPlusPlus14 != LangFrom.CPlusPlus14 ||
This is likely to become a bug in the future, but I didn't see a better way to compare dialects.

Is there a way to add a test that lights up once there is a new dialect?

Would it be too pessimistic to compare the entire LangOpts? Some stuff in there should even still produce errors, right? For example "GnuMode". I skimmed over them and didn't find an obvious one that would differ between translation units of the same project. Maybe the template depth could be set selectively, but to fix that we could mask "COMPATIBLE_" and "BENIGN_" opts.

  rC Clang



More information about the cfe-commits mailing list