aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2024-02-05 21:52:19 -0500
committerMarek Polacek <polacek@redhat.com>2024-02-06 08:06:12 -0500
commit68a8ec7c7404db6fce1be307a3d8bdde6cdbc6fb (patch)
treebae589ef6daa087b4ffd4429366fb6ffcaab5d09 /gcc
parentd29136ad3282905145e24d7ec10b6efe4ab5d2f1 (diff)
downloadgcc-68a8ec7c7404db6fce1be307a3d8bdde6cdbc6fb.zip
gcc-68a8ec7c7404db6fce1be307a3d8bdde6cdbc6fb.tar.gz
gcc-68a8ec7c7404db6fce1be307a3d8bdde6cdbc6fb.tar.bz2
c++: add auto_diagnostic_group to early_check_defaulted_comparison
gcc/cp/ChangeLog: * method.cc (early_check_defaulted_comparison): Add auto_diagnostic_group.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/method.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc
index 3b8dc75..957496d 100644
--- a/gcc/cp/method.cc
+++ b/gcc/cp/method.cc
@@ -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;