Author: rsmith Date: Mon Dec 5 18:14:22 2016 New Revision: 288738 URL: http://llvm.org/viewvc/llvm-project?rev=288738&view=rev Log: Additional test file missed from r288737.
Added: cfe/trunk/test/Modules/redundant-include.mm Added: cfe/trunk/test/Modules/redundant-include.mm URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/redundant-include.mm?rev=288738&view=auto ============================================================================== --- cfe/trunk/test/Modules/redundant-include.mm (added) +++ cfe/trunk/test/Modules/redundant-include.mm Mon Dec 5 18:14:22 2016 @@ -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'}} +} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits