1 // RUN: %clang_cc1 %s -emit-pch -o %t1.pch -verify
2 // RUN: %clang_cc1 %s -emit-pch -o %t2.pch -include-pch %t1.pch -verify
3 // RUN: %clang_cc1 -fsyntax-only %s -include-pch %t2.pch -verify
5 // Test that a redefinition inside the PCH won't manifest as an ambiguous macro.
10 #define M1 0 // expected-note {{previous}}
11 #define M1 1 // expected-warning {{redefined}}
15 #elif !defined(HEADER2)
18 #define M2 4 // expected-warning {{redefined}}
19 // expected-note@-6 {{previous}}
23 // Use the error to verify it was parsed.
24 int x
= M1
; // expected-note {{previous}}
25 int x
= M2
; // expected-error {{redefinition}}