aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2024-10-15 11:03:08 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2024-10-15 11:03:08 -0400
commit77076d85e9aa5e15e1fe5b7db0241fbfc18cf06d (patch)
tree1f28e36c4b9bd64f67b21752739520e91d6f56d8 /gcc
parentf8dcb559e615dbb4557a23363f9532a3544a7241 (diff)
downloadgcc-77076d85e9aa5e15e1fe5b7db0241fbfc18cf06d.zip
gcc-77076d85e9aa5e15e1fe5b7db0241fbfc18cf06d.tar.gz
gcc-77076d85e9aa5e15e1fe5b7db0241fbfc18cf06d.tar.bz2
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 <dmalcolm@redhat.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c b/gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c
index d0fe110..c1510e4 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 *,