blob: 24a7b3edf640d8ffe13477ed42e713627b666e1e [file] [log] [blame]
Sebastian Redlffaab3e2010-07-30 00:29:29 +00001// Test this without pch.
Douglas Gregor77424bc2010-10-02 19:29:26 +00002// RUN: %clang_cc1 -include %S/Inputs/chain-macro-override1.h -include %S/Inputs/chain-macro-override2.h -fsyntax-only -verify -detailed-preprocessing-record %s
Sebastian Redlffaab3e2010-07-30 00:29:29 +00003
4// Test with pch.
Douglas Gregor77424bc2010-10-02 19:29:26 +00005// RUN: %clang_cc1 -emit-pch -o %t1 %S/Inputs/chain-macro-override1.h -detailed-preprocessing-record
Douglas Gregorb5af8432011-08-25 22:54:01 +00006// RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-macro-override2.h -include-pch %t1 -detailed-preprocessing-record
Sebastian Redlffaab3e2010-07-30 00:29:29 +00007// RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s
8
Douglas Gregoree9b0ba2010-10-01 01:03:07 +00009int foo() {
Sebastian Redlffaab3e2010-07-30 00:29:29 +000010 f();
11 g();
12 h();
Douglas Gregora8235d62012-10-09 23:05:51 +000013 h2(); // expected-warning{{implicit declaration of function 'h2' is invalid in C99}}
14 h3();
Douglas Gregoree9b0ba2010-10-01 01:03:07 +000015 return x;
Sebastian Redlffaab3e2010-07-30 00:29:29 +000016}