]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: add auto_diagnostic_group to early_check_defaulted_comparison
authorMarek Polacek <polacek@redhat.com>
Tue, 6 Feb 2024 02:52:19 +0000 (21:52 -0500)
committerMarek Polacek <polacek@redhat.com>
Tue, 6 Feb 2024 13:06:12 +0000 (08:06 -0500)
gcc/cp/ChangeLog:

* method.cc (early_check_defaulted_comparison): Add
auto_diagnostic_group.

gcc/cp/method.cc

index 3b8dc75d1986f9e7b708766a07051aa8b003a708..957496d3e1809704ed534edb2401be4b073bc9a8 100644 (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;