analyzer: Fix PR analyzer/102020

2021-08-23  Ankur Saini  <arsenic@sourceware.org>

gcc/analyzer/ChangeLog:
	PR analyzer/102020
	* diagnostic-manager.cc
	(diagnostic_manager::prune_for_sm_diagnostic)<case EK_CALL_EDGE>: Fix typo.

gcc/testsuite/ChangeLog:
	PR analyzer/102020
	* gcc.dg/analyzer/malloc-callbacks.c : Fix faulty test.
This commit is contained in:
Ankur Saini 2021-08-23 17:03:29 +05:30
parent e7721590e0
commit 537878152d
2 changed files with 2 additions and 2 deletions

View File

@ -2110,7 +2110,7 @@ diagnostic_manager::prune_for_sm_diagnostic (checker_path *path,
= cg_superedge.map_expr_from_callee_to_caller (callee_var,
&expr);
else
callee_var = callee_model->get_representative_tree (sval);
caller_var = caller_model->get_representative_tree (sval);
}
else
caller_var = caller_model->get_representative_tree (sval);

View File

@ -69,7 +69,7 @@ int *test_5 (void)
static void __attribute__((noinline))
called_by_test_6a (void *ptr)
{
free (ptr); /* { dg-warning "double-'free'"} */
free (ptr); /* { dg-warning "double-'free'" } */
}
static deallocator_t __attribute__((noinline))