error: exception specification is not available until end of class definition

Hi,

Let’s say we have a simple test.cpp file.

class A {
public:
virtual ~A() {};
};

class B: public A {
public:
struct C {
~C() throw() {};
};
C c;
//~B();
};

I got an error

test.cpp:11:4: error: exception specification is not available until end of class definition

C c;

^

1 error generated.

when trying to compile it with clang++ -c test.cpp. It works fine with xcode clang but the error occurs when using clang from trunk.

Thanks.

Best regards,
Han