================ @@ -3940,6 +3940,14 @@ static bool RenderModulesOptions(Compilation &C, const Driver &D, Args.ClaimAllArgs(options::OPT_fmodules_disable_diagnostic_validation); } + // Don't check ODR violations for decls in the global module fragment. + // 1. To keep consistent behavior with MSVC, which don't check ODR violations + // in the global module fragment too. + // 2. Give users better using experience since most issue reports complains + // the false positive ODR violations diagnostic and the true positive ODR + // violations are rarely reported. + CmdArgs.push_back("-fskip-odr-check-in-gmf"); ---------------- mizvekov wrote:
```suggestion // FIXME: We provisionally don't check ODR violations for decls in the global module fragment. CmdArgs.push_back("-fskip-odr-check-in-gmf"); ``` https://github.com/llvm/llvm-project/pull/79959 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits