diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-06 00:14:22 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-06 00:14:22 +0000 |
| commit | 8893f35a89a1f399122204a198f0af2fc1a382ca (patch) | |
| tree | 7264f18964a07a3ef8e6e02da1f5c897f1adb6f3 /clang/test/Modules | |
| parent | b9d0193e5906336d555e033c126dcc5f5ae6b0e3 (diff) | |
| download | bcm5719-llvm-8893f35a89a1f399122204a198f0af2fc1a382ca.tar.gz bcm5719-llvm-8893f35a89a1f399122204a198f0af2fc1a382ca.zip | |
Additional test file missed from r288737.
llvm-svn: 288738
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/redundant-include.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Modules/redundant-include.mm b/clang/test/Modules/redundant-include.mm new file mode 100644 index 00000000000..d736022699c --- /dev/null +++ b/clang/test/Modules/redundant-include.mm @@ -0,0 +1,12 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I%S/Inputs %s -verify +// RUN: %clang_cc1 -fmodules-cache-path=%t -fimplicit-module-maps -I%S/Inputs %s -verify + +#include "cxx-header.h" +void includeNotAtTopLevel() { // expected-note {{function 'includeNotAtTopLevel' begins here}} + #include "cxx-header.h" // expected-error {{redundant #include of module 'cxx_library' appears within function 'includeNotAtTopLevel'}} +} + +namespace NS { // expected-note {{begins here}} + #include "cxx-header.h" // expected-error {{redundant #include of module 'cxx_library' appears within namespace 'NS'}} +} |

