]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix analyzer_cpython_plugin.c declarations, PR testsuite/111264
authorHans-Peter Nilsson <hp@axis.com>
Fri, 1 Sep 2023 02:36:03 +0000 (04:36 +0200)
committerHans-Peter Nilsson <hp@bitrange.com>
Fri, 1 Sep 2023 19:00:38 +0000 (21:00 +0200)
Also, add missing newline at end of file.

PR testsuite/111264
* gcc.dg/plugin/analyzer_cpython_plugin.c: Make declarations
C++11-compatible.

gcc/testsuite/gcc.dg/plugin/analyzer_cpython_plugin.c

index 7af520436549e731b2d60c8f400387aab387865c..bf1982e79c37e8ff18ea2023c45058d8c311ef76 100644 (file)
@@ -477,8 +477,8 @@ pyobj_refcnt_checker (const region_model *model,
   if (!ctxt)
     return;
 
-  auto region_to_refcnt = hash_map<const region *, int> ();
-  auto seen_regions = hash_set<const region *> ();
+  hash_map<const region *, int> region_to_refcnt;
+  hash_set<const region *> seen_regions;
 
   count_pyobj_references (model, region_to_refcnt, retval, seen_regions);
   check_refcnts (model, old_model, retval, ctxt, region_to_refcnt);
@@ -561,7 +561,7 @@ public:
     if (!ctxt)
       return;
     region_model *model = cd.get_model ();
-    auto region_to_refcnt = hash_map<const region *, int> ();
+    hash_map<const region *, int> region_to_refcnt;
     count_all_references(model, region_to_refcnt);
     dump_refcnt_info(region_to_refcnt, model, ctxt);
   }
@@ -1330,4 +1330,4 @@ plugin_init (struct plugin_name_args *plugin_info,
   sorry_no_analyzer ();
 #endif
   return 0;
-}
\ No newline at end of file
+}