Debian Codegraph @

gcc/testsuite/c-c++-common/analyzer/malloc-macro-separate-events.c

raw
1 /* Test path-printing in the face of macros. */
2
3 /* { dg-additional-options "-fdiagnostics-path-format=separate-events" } */
4 /* { dg-skip-if "requires hosted libstdc++ for stdlib free" { ! hostedlib } } */
5
6 #include "malloc-macro.h"
7
8 /* { dg-warning "double-'free' of 'ptr'" "warning" { target *-*-* } 2 } */
9 /* { dg-message "first 'free' here" "1st free event" { target *-*-* } 2 } */
10 /* { dg-message "second 'free' here" "2nd free event" { target *-*-* } 2 } */
11
12 void test (void *ptr)
13 {
14 WRAPPED_FREE (ptr); /* { dg-message "in expansion of macro 'WRAPPED_FREE'" } */
15 WRAPPED_FREE (ptr); /* { dg-message "in expansion of macro 'WRAPPED_FREE'" } */
16 }