mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 18:11:19 +00:00
7607fce112
Without this patch, record decls with invalid out-of-line method delcs would sometimes be marked invalid, but not always. With this patch, they are consistently never marked invalid. (The code to do this was added in http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100809/033154.html , but the test from that revision is still passing.) As far as I can tell, this was the only place where a class was marked invalid after its definition was complete. llvm-svn: 197848
25 lines
432 B
C++
25 lines
432 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
// Don't crash (PR18284).
|
|
|
|
namespace n1 {
|
|
class A { };
|
|
class C { A a; };
|
|
|
|
A::RunTest() {} // expected-error {{C++ requires a type specifier for all declarations}}
|
|
|
|
void f() {
|
|
new C;
|
|
}
|
|
} // namespace n1
|
|
|
|
namespace n2 {
|
|
class A { };
|
|
class C : public A { };
|
|
|
|
A::RunTest() {} // expected-error {{C++ requires a type specifier for all declarations}}
|
|
|
|
void f() {
|
|
new C;
|
|
}
|
|
} // namespace n2
|