RequireCompleteType(Begin, BaseType, DK))
Invalid = true;
+ if (!Invalid && RequireNonAbstractType(Begin, ExDeclType,
+ diag::err_abstract_type_in_decl,
+ AbstractVariableType))
+ Invalid = true;
+
// FIXME: Need to test for ability to copy-construct and destroy the
// exception variable.
// FIXME: Need to check for abstract classes.
struct A; // expected-note 4 {{forward declaration of 'struct A'}}
+struct Abstract { virtual void f() = 0; }; // expected-note {{pure virtual function 'f'}}
+
void trys() {
try {
} catch(int i) { // expected-note {{previous definition}}
} catch(A a) { // expected-error {{cannot catch incomplete type 'struct A'}}
} catch(A *a) { // expected-error {{cannot catch pointer to incomplete type 'struct A'}}
} catch(A &a) { // expected-error {{cannot catch reference to incomplete type 'struct A'}}
+ } catch(Abstract) { // expected-error {{variable type 'Abstract' is an abstract class}}
} catch(...) {
int j = i; // expected-error {{use of undeclared identifier 'i'}}
}