c++: Add auto_diagnostic_group to check_handlers_1.

This was missing.

gcc/cp/ChangeLog:

	* except.c (check_handlers_1): Add auto_diagnostic_group.
This commit is contained in:
Marek Polacek 2020-11-05 18:23:56 -05:00
parent e6fd02cc6d
commit 44e1f63e20

View 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)))