brintos

brintos / llvm-project-archived public Read only

0
0
Text · 428 B · 7ee0aa5 Raw
11 lines · c
1// RUN: rm -rf %t && mkdir %t && %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-html %s -o %t/plist-html.c.plist -verify2// RUN: tail -n +11 %t/plist-html.c.plist | %normalize_plist | diff -ub %S/Inputs/expected-plists/plist-html.c.plist -3 4int foo(int *p) {5    if (p) {6        return 0;7    } else {8        return *p;  // expected-warning {{Dereference of null pointer (loaded from variable 'p')}}9    }10}11