diff options
author | Davide Italiano <davide@freebsd.org> | 2015-07-25 01:19:32 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2015-07-25 01:19:32 +0000 |
commit | 922b702bf9d4a27cde8fe08f9bb694b8ca8d94ac (patch) | |
tree | d935c5f5fea7cfcca3e824ba4433f115fc027143 /clang/test/SemaTemplate/crash-unparsed-exception.cpp | |
parent | 28df04211cd50a0da0ef984e6163a32e3e38aa2b (diff) | |
download | bcm5719-llvm-922b702bf9d4a27cde8fe08f9bb694b8ca8d94ac.tar.gz bcm5719-llvm-922b702bf9d4a27cde8fe08f9bb694b8ca8d94ac.zip |
[SemaTemplate] Detect instantiation of unparsed exceptions.
This fixes the clang crash reported in PR24000.
Differential Revision: http://reviews.llvm.org/D11341
llvm-svn: 243196
Diffstat (limited to 'clang/test/SemaTemplate/crash-unparsed-exception.cpp')
-rw-r--r-- | clang/test/SemaTemplate/crash-unparsed-exception.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/crash-unparsed-exception.cpp b/clang/test/SemaTemplate/crash-unparsed-exception.cpp new file mode 100644 index 00000000000..1226b35deb7 --- /dev/null +++ b/clang/test/SemaTemplate/crash-unparsed-exception.cpp @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify -fcxx-exceptions -fexceptions %s + +struct A { + virtual ~A(); +}; +template <class> +struct B {}; +struct C { + template <typename> + struct D { + ~D() throw(); + }; + struct E : A { + D<int> d; //expected-error{{exception specification is not available until end of class definition}} + }; + B<int> b; //expected-note{{in instantiation of template class 'B<int>' requested here}} +}; |