Home | History | Annotate | Download | only in Analysis
      1 // RUN: %clang_cc1 -emit-pch -o %t %s
      2 // RUN: %clang_cc1 -error-on-deserialized-decl S1_method -include-pch %t -analyze -analyzer-checker=core %s
      3 // RUN: %clang_cc1 -include-pch %t -analyze -analyzer-checker=core -verify %s
      4 
      5 #ifndef HEADER
      6 #define HEADER
      7 // Header.
      8 
      9 void S1_method(); // This should not be deserialized.
     10 
     11 
     12 #else
     13 // Using the header.
     14 
     15 int test() {
     16   int x = 0;
     17   return 5/x; //expected-warning {{Division by zero}}
     18 }
     19 
     20 #endif
     21