2
0

chain-decls.c 628 B

1234567891011121314151617181920212223242526272829
  1. // Test this without pch.
  2. // RUN: %clang_cc1 -include %S/Inputs/chain-decls1.h -include %S/Inputs/chain-decls2.h -fsyntax-only -verify %s
  3. // Test with pch.
  4. // RUN: %clang_cc1 -emit-pch -o %t1 %S/Inputs/chain-decls1.h
  5. // RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-decls2.h -include-pch %t1
  6. // RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s
  7. // RUN: %clang_cc1 -ast-print -include-pch %t2 %s | FileCheck %s
  8. // expected-no-diagnostics
  9. // CHECK: void f();
  10. // CHECK: void g();
  11. int h() {
  12. f();
  13. g();
  14. struct one x;
  15. one();
  16. struct two y;
  17. two();
  18. struct three z;
  19. many(0);
  20. struct many m;
  21. noret();
  22. }