From: David Malcolm Date: Tue, 15 Oct 2024 15:03:08 +0000 (-0400) Subject: testsuite: simplify analyzer_cpython_plugin.c X-Git-Tag: basepoints/gcc-16~5192 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77076d85e9aa5e15e1fe5b7db0241fbfc18cf06d;p=thirdparty%2Fgcc.git testsuite: simplify analyzer_cpython_plugin.c No functional change intended. gcc/testsuite/ChangeLog: * gcc.dg/plugin/analyzer_cpython_plugin.c: Use success_call_info in a couple of places to avoid reimplementing get_desc. Signed-off-by: David Malcolm --- diff --git a/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c b/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c index d0fe110f20e..c1510e441e6 100644 --- a/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c +++ b/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c @@ -963,17 +963,10 @@ public: void kf_PyList_New::impl_call_post (const call_details &cd) const { - class success : public call_info + class success : public success_call_info { public: - success (const call_details &cd) : call_info (cd) {} - - label_text - get_desc (bool can_colorize) const final override - { - return make_label_text (can_colorize, "when %qE succeeds", - get_fndecl ()); - } + success (const call_details &cd) : success_call_info (cd) {} bool update_model (region_model *model, const exploded_edge *, @@ -1104,17 +1097,10 @@ public: void kf_PyLong_FromLong::impl_call_post (const call_details &cd) const { - class success : public call_info + class success : public success_call_info { public: - success (const call_details &cd) : call_info (cd) {} - - label_text - get_desc (bool can_colorize) const final override - { - return make_label_text (can_colorize, "when %qE succeeds", - get_fndecl ()); - } + success (const call_details &cd) : success_call_info (cd) {} bool update_model (region_model *model, const exploded_edge *,