diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-02-05 16:36:52 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-02-05 16:36:52 +0000 |
commit | 3ad86fd2effccf1b9337e8cb9a317e4353cec275 (patch) | |
tree | 5fdb879c0e095d904a9348553432156c21ea70d1 /test/PCH | |
parent | ee0feec7362053f22b6c01d12e1bfa06fb3ac93f (diff) |
[frontend] Don't put a PCH/PTH filename into the set of includes in the preprocessor options;
since only one of them is allowed in command-line, process them separately.
Otherwise, if more than one is specified in the command-line, one is processed normally
and the others are going to be treated and included as header files.
Related to radar://13140508
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
-rw-r--r-- | test/PCH/multiple-include-pch.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/PCH/multiple-include-pch.c b/test/PCH/multiple-include-pch.c new file mode 100644 index 0000000000..1ef17b9c67 --- /dev/null +++ b/test/PCH/multiple-include-pch.c @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -emit-pch -o %t1.pch %s +// RUN: %clang_cc1 -emit-pch -o %t2.pch %s +// RUN: %clang_cc1 %s -include-pch %t1.pch -include-pch %t2.pch -verify + +#ifndef HEADER +#define HEADER + +extern int x; + +#else + +#warning parsed this +// expected-warning@-1 {{parsed this}} +int foo() { + return x; +} + +#endif |