xref: /llvm-project/clang/test/Modules/redecls.m (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1// RUN: rm -rf %t.mcp
2// RUN: %clang_cc1 -fmodules -fimplicit-module-maps %s -emit-pch -o %t1.pch -fmodules-cache-path=%t.mcp -I %S/Inputs/redecls
3// RUN: %clang_cc1 -fmodules -fimplicit-module-maps %s -emit-pch -o %t2.pch -include-pch %t1.pch -fmodules-cache-path=%t.mcp -I %S/Inputs/redecls
4// RUN: %clang_cc1 -fmodules -fimplicit-module-maps %s -fsyntax-only -include-pch %t2.pch -I %S/Inputs/redecls -fmodules-cache-path=%t.mcp -verify
5
6#ifndef HEADER1
7#define HEADER1
8
9@import a;
10
11#elif !defined(HEADER2)
12#define HEADER2
13
14@class AA;
15@import b;
16
17#else
18
19@interface SS : AA
20@end
21
22#warning parsed this
23#endif
24// expected-warning@-2{{parsed this}}
25