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 | 48b72d81c8968f3d342557582db986a60aef2c54 (patch) | |
| tree | 06af75dac2898c6c3a52ed3132d9facb80921462 /clang/test/PCH/multiple-include-pch.c | |
| parent | b76de88288b32ce192a03cd7b387bf0137fbd436 (diff) | |
| download | bcm5719-llvm-48b72d81c8968f3d342557582db986a60aef2c54.tar.gz bcm5719-llvm-48b72d81c8968f3d342557582db986a60aef2c54.zip | |
[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
llvm-svn: 174385
Diffstat (limited to 'clang/test/PCH/multiple-include-pch.c')
| -rw-r--r-- | clang/test/PCH/multiple-include-pch.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/PCH/multiple-include-pch.c b/clang/test/PCH/multiple-include-pch.c new file mode 100644 index 00000000000..1ef17b9c675 --- /dev/null +++ b/clang/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 |

