diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-10-14 14:59:48 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-10-14 14:59:48 +0000 |
commit | 7eb5d377d7bc0c3a786563bcdb22e2edbd8565ed (patch) | |
tree | 33c26c6664aad660442ca9c3551564d20c17e61b /clang/test/SemaCXX/exception-spec.cpp | |
parent | 075b21d4dc39ad89f0e1ceaf11f6438d1c29fec6 (diff) | |
download | bcm5719-llvm-7eb5d377d7bc0c3a786563bcdb22e2edbd8565ed.tar.gz bcm5719-llvm-7eb5d377d7bc0c3a786563bcdb22e2edbd8565ed.zip |
Use partial diagnostics properly in call to RequireCompleteType. Among other things, this means we get a note on the declaration of the incomplete type when it is used in an exception specification.
llvm-svn: 84099
Diffstat (limited to 'clang/test/SemaCXX/exception-spec.cpp')
-rw-r--r-- | clang/test/SemaCXX/exception-spec.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/exception-spec.cpp b/clang/test/SemaCXX/exception-spec.cpp index f55a4494ea4..9b2a07d7965 100644 --- a/clang/test/SemaCXX/exception-spec.cpp +++ b/clang/test/SemaCXX/exception-spec.cpp @@ -24,7 +24,7 @@ void (**j)() throw(int); // expected-error {{not allowed beyond a single}} // Pointer to function returning pointer to pointer to function with spec void (**(*h())())() throw(int); // expected-error {{not allowed beyond a single}} -struct Incomplete; +struct Incomplete; // expected-note 3 {{forward declaration}} // Exception spec must not have incomplete types, or pointers to them, except // void. @@ -180,3 +180,8 @@ void mfnptr() void (Str1::*pfn2)() = &Str1::f; // valid void (Str1::*pfn3)() throw() = &Str1::f; // expected-error {{not superset}} expected-error {{incompatible type}} } + +// Don't suppress errors in template instantiation. +template <typename T> struct TEx; // expected-note {{template is declared here}} + +void tf() throw(TEx<int>); // expected-error {{implicit instantiation of undefined template}} |