blob: 1f9c27c2a361b4c4995289bbabe8f0cfa0eeb680 [file] [log] [blame]
Douglas Gregor8bf778e2013-02-06 22:40:31 +00001// First trial: pass -DIGNORED=1 to both. It should be ignored in both
2// RUN: rm -rf %t.modules
3// RUN: %clang_cc1 -fmodule-cache-path %t.modules -DIGNORED=1 -fmodules -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify
4// RUN: %clang_cc1 -fmodule-cache-path %t.modules -DIGNORED=1 -fmodules -I %S/Inputs -include-pch %t.pch %s -verify
5
6// Second trial: pass -DIGNORED=1 only to the second invocation.
7// RUN: rm -rf %t.modules
8// RUN: %clang_cc1 -fmodule-cache-path %t.modules -fmodules -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %s -verify
9// RUN: not %clang_cc1 -fmodule-cache-path %t.modules -DIGNORED=1 -fmodules -I %S/Inputs -include-pch %t.pch %s > %t.err 2>&1
10// RUN: FileCheck -check-prefix=CHECK-CONFLICT %s < %t.err
11// CHECK-CONFLICT: module 'ignored_macros' found in both
12
13// expected-no-diagnostics
14
15#ifndef HEADER
16#define HEADER
17@import ignored_macros;
18#endif
19
20@import ignored_macros;
21
22struct Point p;