summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-07-13 02:00:19 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-07-13 02:00:19 +0000
commit95d99308c448cd50596e75ca51286ff1e1f750e2 (patch)
treeef7f595ff9b7715326bf529e7b0a3c90135d89fc /clang/test
parent7459be6dc7ee344d5fa9859c50cb892bc4443d16 (diff)
downloadbcm5719-llvm-95d99308c448cd50596e75ca51286ff1e1f750e2.tar.gz
bcm5719-llvm-95d99308c448cd50596e75ca51286ff1e1f750e2.zip
C++ modules: Don't call DeclContext::lookup when half-way through deserializing
decls. That can reenter deserialization and explode horribly by trying to merge a declaration that we've not got very far through deserializing yet. llvm-svn: 186236
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/PCH/cxx-templates.cpp5
-rw-r--r--clang/test/PCH/cxx-templates.h20
2 files changed, 25 insertions, 0 deletions
diff --git a/clang/test/PCH/cxx-templates.cpp b/clang/test/PCH/cxx-templates.cpp
index 433f73f12a2..f57245e7c1c 100644
--- a/clang/test/PCH/cxx-templates.cpp
+++ b/clang/test/PCH/cxx-templates.cpp
@@ -94,3 +94,8 @@ namespace rdar13135282 {
void CallDependentSpecializedFunc(DependentSpecializedFuncClass<int> &x) {
DependentSpecializedFunc(x);
}
+
+namespace cyclic_module_load {
+ extern std::valarray<int> x;
+ std::valarray<int> y(x);
+}
diff --git a/clang/test/PCH/cxx-templates.h b/clang/test/PCH/cxx-templates.h
index 00064aeefa5..ce6b7051ecc 100644
--- a/clang/test/PCH/cxx-templates.h
+++ b/clang/test/PCH/cxx-templates.h
@@ -276,3 +276,23 @@ template<typename T> class DependentSpecializedFuncClass {
void foo() {}
friend void DependentSpecializedFunc<>(DependentSpecializedFuncClass);
};
+
+namespace cyclic_module_load {
+ // Reduced from a libc++ modules crasher.
+ namespace std {
+ template<class> class mask_array;
+ template<class> class valarray {
+ public:
+ valarray(const valarray &v);
+ };
+
+ class gslice {
+ valarray<int> x;
+ valarray<int> stride() const { return x; }
+ };
+
+ template<class> class mask_array {
+ template<class> friend class valarray;
+ };
+ }
+}
OpenPOWER on IntegriCloud