aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/infinite-recursion.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer/infinite-recursion.cc')
-rw-r--r--gcc/analyzer/infinite-recursion.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/analyzer/infinite-recursion.cc b/gcc/analyzer/infinite-recursion.cc
index 9576ff5..0fab9b7 100644
--- a/gcc/analyzer/infinite-recursion.cc
+++ b/gcc/analyzer/infinite-recursion.cc
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic-core.h"
#include "diagnostic-event-id.h"
#include "diagnostic-path.h"
-#include "diagnostic-metadata.h"
#include "function.h"
#include "pretty-print.h"
#include "sbitmap.h"
@@ -95,13 +94,11 @@ public:
return OPT_Wanalyzer_infinite_recursion;
}
- bool emit (rich_location *rich_loc, logger *) final override
+ bool emit (diagnostic_emission_context &ctxt) final override
{
/* "CWE-674: Uncontrolled Recursion". */
- diagnostic_metadata m;
- m.add_cwe (674);
- return warning_meta (rich_loc, m, get_controlling_option (),
- "infinite recursion");
+ ctxt.add_cwe (674);
+ return ctxt.warn ("infinite recursion");
}
label_text describe_final_event (const evdesc::final_event &ev) final override