r288738 - Additional test file missed from r288737.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 5 16:14:23 PST 2016


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'}}
+}




More information about the cfe-commits mailing list