chain-empty-initial-namespace.cpp 366 B

123456789101112131415161718192021222324
  1. // no PCH
  2. // RUN: %clang_cc1 -include %s -include %s -fsyntax-only %s
  3. // full PCH
  4. // RUN: %clang_cc1 -chain-include %s -chain-include %s -fsyntax-only %s
  5. #if !defined(PASS1)
  6. #define PASS1
  7. namespace foo {} // no external storage
  8. #elif !defined(PASS2)
  9. #define PASS2
  10. namespace foo {
  11. void bar();
  12. }
  13. #else
  14. // PASS3
  15. void test() {
  16. foo::bar(); // no-error
  17. }
  18. #endif