diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-07-13 02:00:19 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-07-13 02:00:19 +0000 |
commit | e7bae1597f4a7088f5048695c14a8f1013a86108 (patch) | |
tree | 227bf505544e14a051d3981a5ea5889bc8c4fba1 /test/PCH | |
parent | 3be37d1d2d5733523e516e5a6b22c576e740230e (diff) | |
download | clang-e7bae1597f4a7088f5048695c14a8f1013a86108.tar.gz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186236 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
-rw-r--r-- | test/PCH/cxx-templates.cpp | 5 | ||||
-rw-r--r-- | test/PCH/cxx-templates.h | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test/PCH/cxx-templates.cpp b/test/PCH/cxx-templates.cpp index 433f73f12a..f57245e7c1 100644 --- a/test/PCH/cxx-templates.cpp +++ b/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/test/PCH/cxx-templates.h b/test/PCH/cxx-templates.h index 00064aeefa..ce6b7051ec 100644 --- a/test/PCH/cxx-templates.h +++ b/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; + }; + } +} |