]> granicus.if.org Git - clang/commitdiff
Change layering warning tests to not actually build modules.
authorDaniel Jasper <djasper@google.com>
Wed, 11 Dec 2013 09:11:12 +0000 (09:11 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 11 Dec 2013 09:11:12 +0000 (09:11 +0000)
Specifically, we want to warn only for direct layering violations for
the modules we are calling clang on.

This temporarily unblocks
http://llvm-reviews.chandlerc.com/D2374

Once that is in, we'll also want to investigate whether to check the
layering in the build step of modules that we build transitively.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197021 91177308-0d34-0410-b5e6-96231b3b80d8

test/Modules/Inputs/declare-use/module.map
test/Modules/declare-use1.cpp
test/Modules/declare-use2.cpp

index 774fc37760c9c765fba263941fe6303755c48660..ba615b67144ac182826b447b62a3fac23260f806 100644 (file)
@@ -9,11 +9,13 @@ module XB {
 module XC {
   header "c.h"
   use XA
+  // Intentionally doesn't use XB to show that -fdecl-use isn't transitive.
 }
 
 module XD {
   header "d.h"
   use XA
+  // Intentionally doesn't use XB to show that -fdecl-use isn't transitive.
 }
 
 module XE {
index 5b344032d29db57d62dde8263e5100072d6017b8..49993cf488cd3c9b3135e2fa8dffda9fe113850d 100644 (file)
@@ -1,5 +1,5 @@
 // RUN: rm -rf %t
-// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify
+// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify
 
 #include "g.h"
 #include "e.h"
index 15c57ca36d8af6038776bef222d33af7a5ef95bb..45352891685d23fd0cad83eda5030241cae4259c 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: rm -rf %t
-// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodules-decluse -fmodule-name=XH -I %S/Inputs/declare-use %s -verify
+// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XH -I %S/Inputs/declare-use %s -verify
 
 #include "h.h"
 #include "e.h"
-#include "f.h" // expected-error {{does not depend on a module exporting}}
+#include "f.h" // expected-error {{module XH does not depend on a module exporting 'f.h'}}
 const int h2 = h1+e+f;