Home | History | Annotate | Download | only in Coverage
      1 // RUN: rm -rf %t
      2 // RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t %s
      3 // RUN: cat %t/*.html | FileCheck %s
      4 
      5 // CHECK: <h3>Annotated Source Code</h3>
      6 
      7 // Without tweaking expr, the expr would hit to the line below
      8 // emitted to the output as comment.
      9 // CHECK: {{[D]ereference of null pointer}}
     10 
     11 void f0(int x) {
     12   int *p = &x;
     13 
     14   if (x > 10) {
     15     if (x == 22)
     16       p = 0;
     17   }
     18 
     19   *p = 10;
     20 }
     21 
     22 
     23