================ @@ -0,0 +1,32 @@ +// RUN: rm -fR %t +// RUN: split-file %s %t +// RUN: cd %t +// RUN: %clang_cc1 -verify -std=c++20 -fskip-odr-check-in-gmf -emit-header-unit -xc++-user-header bz0.h +// RUN: %clang_cc1 -verify -std=c++20 -fskip-odr-check-in-gmf -emit-header-unit -xc++-user-header bz1.h +// RUN: %clang_cc1 -verify -std=c++20 -fskip-odr-check-in-gmf -emit-header-unit -xc++-user-header -fmodule-file=bz0.pcm -fmodule-file=bz1.pcm bz.cpp + +//--- compare +template<typename _Tp> +inline constexpr unsigned __cmp_cat_id = 1; + +template<typename... _Ts> +constexpr auto __common_cmp_cat() { + (__cmp_cat_id<_Ts> | ...); +} + +//--- bz0.h +template <class T> +int operator|(T, T); + +#include "compare" ---------------- ChuanqiXu9 wrote:
But this case, I feel this is a real ODR violation. The intention of skipping ODR checks in GMF is we have too many false positive ODR violation diagnostics. But I prefer to not make it for real ODR violations. https://github.com/llvm/llvm-project/pull/111160 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits