c++: Add auto_diagnostic_group to check_handlers_1.
authorMarek Polacek <polacek@redhat.com>
Thu, 5 Nov 2020 23:23:56 +0000 (18:23 -0500)
committerMarek Polacek <polacek@redhat.com>
Thu, 5 Nov 2020 23:24:19 +0000 (18:24 -0500)
This was missing.

gcc/cp/ChangeLog:

* except.c (check_handlers_1): Add auto_diagnostic_group.

gcc/cp/except.c

index 985206f6a6496611cb863ba048f112720ceb2aa6..b72a28c1aa943013ee45ed77de36a8dbffbb1a91 100644 (file)
@@ -975,6 +975,7 @@ check_handlers_1 (tree master, tree_stmt_iterator i)
       tree handler = tsi_stmt (i);
       if (TREE_TYPE (handler) && can_convert_eh (type, TREE_TYPE (handler)))
        {
+         auto_diagnostic_group d;
          if (warning_at (EXPR_LOCATION (handler), OPT_Wexceptions,
                          "exception of type %qT will be caught by earlier "
                          "handler", TREE_TYPE (handler)))