c++: add auto_diagnostic_group to early_check_defaulted_comparison

gcc/cp/ChangeLog:

	* method.cc (early_check_defaulted_comparison): Add
	auto_diagnostic_group.
This commit is contained in:
Marek Polacek 2024-02-05 21:52:19 -05:00
parent d29136ad32
commit 68a8ec7c74

View file

@ -1229,6 +1229,7 @@ early_check_defaulted_comparison (tree fn)
ctx = TYPE_MAIN_VARIANT (parmtype);
if (!is_friend (ctx, fn))
{
auto_diagnostic_group d;
error_at (loc, "defaulted %qD is not a friend of %qT", fn, ctx);
inform (location_of (ctx), "declared here");
ok = false;