[clang] [clang][Serialization] Outline LangOptions mismatch diagnostics (PR #202843)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 06:36:41 PDT 2026
================
@@ -333,8 +346,8 @@ static bool checkLanguageOptions(const LangOptions &LangOpts,
!AllowCompatibleDifferences)) { \
if (ExistingLangOpts.get##Name() != LangOpts.get##Name()) { \
if (Diags) \
- Diags->Report(diag::err_ast_file_langopt_value_mismatch) \
- << Description << ModuleFilename; \
+ diagnoseLanguageOptionValueMismatch(*Diags, Description, \
----------------
erichkeane wrote:
I kinda think the `if(Diags)` check probably belongs in these as well. Has the advantage of SLIGHTLY smaller code size, but from a preventing-mistakes perspective, seems superior. It ends up reversing Bits vs Diags check order on 314, but I think that is innocuous.
https://github.com/llvm/llvm-project/pull/202843
More information about the cfe-commits
mailing list