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 | 3e5a0734661756b8fef5093bd0d1fa6ce9c164e8 (patch) | |
tree | 82ef1925579966db5351c3a1799ee7f3ee7046fb /test/Modules/redundant-include.mm | |
parent | a7fb4573dfc1578edb3ba94acfa485167f8d5b9c (diff) |
Additional test file missed from r288737.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288738 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/redundant-include.mm')
-rw-r--r-- | test/Modules/redundant-include.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Modules/redundant-include.mm b/test/Modules/redundant-include.mm new file mode 100644 index 0000000000..d736022699 --- /dev/null +++ b/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'}} +} |