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