summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/textual-headers.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-10-24 20:23:01 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-10-24 20:23:01 +0000
commit202210b3694940b4e5cca50aa3b6208e0298121b (patch)
tree4979cefac81736c80c162bd4d1ad11a0833d8eba /clang/test/Modules/textual-headers.cpp
parent90a3b19e645143e320b8ea4b5ca348bc6fb34e94 (diff)
downloadbcm5719-llvm-202210b3694940b4e5cca50aa3b6208e0298121b.tar.gz
bcm5719-llvm-202210b3694940b4e5cca50aa3b6208e0298121b.zip
[modules] Support combining 'textual' with 'private'.
llvm-svn: 220589
Diffstat (limited to 'clang/test/Modules/textual-headers.cpp')
-rw-r--r--clang/test/Modules/textual-headers.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/Modules/textual-headers.cpp b/clang/test/Modules/textual-headers.cpp
index d1be8ad0321..cab9991e329 100644
--- a/clang/test/Modules/textual-headers.cpp
+++ b/clang/test/Modules/textual-headers.cpp
@@ -1,6 +1,6 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify
-// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify -fno-modules-error-recovery
#define GIMME_A_K
#include "k.h"
@@ -8,4 +8,11 @@
#define GIMME_AN_L
#include "l.h" // expected-error {{module XG does not depend on a module exporting 'l.h'}}
+#include "m2.h" // expected-error {{module XG does not depend on a module exporting 'm2.h'}}
+const int use_m = m; // expected-error {{undeclared identifier}}
+
+#define GIMME_AN_M
+#include "m.h" // expected-error {{use of private header from outside its module: 'm.h'}}
+const int use_m_2 = m;
+
const int g = k + l;
OpenPOWER on IntegriCloud