Clang Project

clang_source_code/test/Analysis/inline-unique-reports.c
1// RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference -analyzer-output=plist -o %t > /dev/null 2>&1
2// RUN: cat %t | %diff_plist %S/Inputs/expected-plists/inline-unique-reports.c.plist -
3
4static inline bug(int *p) {
5  *p = 0xDEADBEEF;
6}
7
8void test_bug_1() {
9  int *p = 0;
10  bug(p);
11}
12
13void test_bug_2() {
14  int *p = 0;
15  bug(p);
16}
17
18
19