1 | // RUN: %clang_cc1 -target-linker-version 100 -emit-pch %s -o %t.h.pch |
---|---|
2 | // RUN: %clang_cc1 -target-linker-version 200 %s -include-pch %t.h.pch -fsyntax-only -verify |
3 | |
4 | #ifndef HEADER |
5 | #define HEADER |
6 | |
7 | extern int foo; |
8 | |
9 | #else |
10 | |
11 | void f() { |
12 | int a = foo; |
13 | // Make sure we parsed this by getting an error. |
14 | int b = bar; // expected-error {{undeclared}} |
15 | } |
16 | |
17 | #endif |
18 |