summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Modules/Inputs/PR28752/Subdir1/b.h1
-rw-r--r--clang/test/Modules/Inputs/PR28752/Subdir1/c.h0
-rw-r--r--clang/test/Modules/Inputs/PR28752/Subdir1/module.modulemap5
-rw-r--r--clang/test/Modules/Inputs/PR28752/a.h1
-rw-r--r--clang/test/Modules/Inputs/PR28752/module.modulemap1
-rw-r--r--clang/test/Modules/Inputs/PR28752/vector28
-rw-r--r--clang/test/Modules/pr28752.cpp19
7 files changed, 55 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/PR28752/Subdir1/b.h b/clang/test/Modules/Inputs/PR28752/Subdir1/b.h
new file mode 100644
index 00000000000..3b3a25f213f
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR28752/Subdir1/b.h
@@ -0,0 +1 @@
+#include <vector>
diff --git a/clang/test/Modules/Inputs/PR28752/Subdir1/c.h b/clang/test/Modules/Inputs/PR28752/Subdir1/c.h
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR28752/Subdir1/c.h
diff --git a/clang/test/Modules/Inputs/PR28752/Subdir1/module.modulemap b/clang/test/Modules/Inputs/PR28752/Subdir1/module.modulemap
new file mode 100644
index 00000000000..8d3bfe996f5
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR28752/Subdir1/module.modulemap
@@ -0,0 +1,5 @@
+module b {
+ module "b.h" { header "b.h" export * }
+ module "c.h" { header "c.h" export * }
+ export *
+}
diff --git a/clang/test/Modules/Inputs/PR28752/a.h b/clang/test/Modules/Inputs/PR28752/a.h
new file mode 100644
index 00000000000..3b3a25f213f
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR28752/a.h
@@ -0,0 +1 @@
+#include <vector>
diff --git a/clang/test/Modules/Inputs/PR28752/module.modulemap b/clang/test/Modules/Inputs/PR28752/module.modulemap
new file mode 100644
index 00000000000..caf888fc474
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR28752/module.modulemap
@@ -0,0 +1 @@
+module a { header "a.h" export * }
diff --git a/clang/test/Modules/Inputs/PR28752/vector b/clang/test/Modules/Inputs/PR28752/vector
new file mode 100644
index 00000000000..fc5dafae1f9
--- /dev/null
+++ b/clang/test/Modules/Inputs/PR28752/vector
@@ -0,0 +1,28 @@
+#ifndef VECTOR
+#define VECTOR
+template <bool, typename> struct B;
+template <typename _Tp> struct B<true, _Tp> { typedef _Tp type; };
+namespace std {
+template <typename> struct D {
+
+ template <typename _Alloc2> struct F {
+ static const bool value = 0;
+ };
+
+ template <typename _Alloc2>
+ typename B<F<_Alloc2>::value, _Alloc2>::type _S_select(_Alloc2);
+ template <typename _Alloc2>
+ static
+ typename B<!F<_Alloc2>::value, _Alloc2>::type _S_select(_Alloc2);
+};
+template <typename _Alloc>
+template <typename _Alloc2>
+const bool D<_Alloc>::F<_Alloc2>::value;
+
+template <typename> class vector {
+public:
+ vector(int);
+ vector(vector &) : vector(D<bool>::_S_select((bool)0)) {}
+};
+}
+#endif // VECTOR \ No newline at end of file
diff --git a/clang/test/Modules/pr28752.cpp b/clang/test/Modules/pr28752.cpp
new file mode 100644
index 00000000000..e73a54b89eb
--- /dev/null
+++ b/clang/test/Modules/pr28752.cpp
@@ -0,0 +1,19 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -std=c++11 -nostdsysteminc -I%S/Inputs/PR28752 -verify %s
+// RUN: %clang_cc1 -std=c++11 -nostdsysteminc -fmodules -fmodule-map-file=%S/Inputs/PR28752/Subdir1/module.modulemap -fmodule-map-file=%S/Inputs/PR28752/module.modulemap -fmodules-cache-path=%t -I%S/Inputs/PR28752 -I%S/Inputs/PR28752/Subdir1 -verify %s
+
+#include "a.h"
+#include "Subdir1/c.h"
+#include <vector>
+
+class TClingClassInfo {
+ std::vector<int> fIterStack;
+};
+
+TClingClassInfo *a;
+class TClingBaseClassInfo {
+ TClingBaseClassInfo() { new TClingClassInfo(*a); }
+};
+
+// expected-no-diagnostics
+
OpenPOWER on IntegriCloud