From 8893f35a89a1f399122204a198f0af2fc1a382ca Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 6 Dec 2016 00:14:22 +0000 Subject: [PATCH] Additional test file missed from r288737. llvm-svn: 288738 --- clang/test/Modules/redundant-include.mm | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 clang/test/Modules/redundant-include.mm diff --git a/clang/test/Modules/redundant-include.mm b/clang/test/Modules/redundant-include.mm new file mode 100644 index 0000000..d736022 --- /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'}} +} -- 2.7.4