diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-06 18:14:43 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-06 18:14:43 +0000 |
commit | c41b878b24bf9619d5351b05d7088221dfbe9447 (patch) | |
tree | 90c3e7f1294d3efa1240036f068f32ec34dc2de7 /test/SemaTemplate/instantiate-try-catch.cpp | |
parent | d322429a1fd0ecc423bb2a9a1cd5cf1ecd102913 (diff) | |
download | clang-c41b878b24bf9619d5351b05d7088221dfbe9447.tar.gz clang-c41b878b24bf9619d5351b05d7088221dfbe9447.tar.bz2 clang-c41b878b24bf9619d5351b05d7088221dfbe9447.tar.xz |
Don't try to type-check a copy construction of an exception
declaration with dependent type. Fixes PR10232 /
<rdar://problem/9700653>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-try-catch.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-try-catch.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-try-catch.cpp b/test/SemaTemplate/instantiate-try-catch.cpp index 1c6c26f258..f4ce0e1731 100644 --- a/test/SemaTemplate/instantiate-try-catch.cpp +++ b/test/SemaTemplate/instantiate-try-catch.cpp @@ -12,3 +12,20 @@ template struct TryCatch0<int&>; // okay template struct TryCatch0<int&&>; // expected-note{{instantiation}} template struct TryCatch0<int>; // expected-note{{instantiation}} + +namespace PR10232 { + template <typename T> + class Templated { + struct Exception { + private: + Exception(const Exception&); // expected-note{{declared private here}} + }; + void exception() { + try { + } catch(Exception e) { // expected-error{{calling a private constructor of class 'PR10232::Templated<int>::Exception'}} + } + } + }; + + template class Templated<int>; // expected-note{{in instantiation of member function 'PR10232::Templated<int>::exception' requested here}} +} |