[cfe-commits] r110540 - /cfe/trunk/test/SemaCXX/virtual-base-used.cpp
Eli Friedman
eli.friedman at gmail.com
Sat Aug 7 22:07:06 PDT 2010
Author: efriedma
Date: Sun Aug 8 00:07:06 2010
New Revision: 110540
URL: http://llvm.org/viewvc/llvm-project?rev=110540&view=rev
Log:
Make this test check a few more cases which didn't work correctly before
r110526.
Modified:
cfe/trunk/test/SemaCXX/virtual-base-used.cpp
Modified: cfe/trunk/test/SemaCXX/virtual-base-used.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/virtual-base-used.cpp?rev=110540&r1=110539&r2=110540&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/virtual-base-used.cpp (original)
+++ cfe/trunk/test/SemaCXX/virtual-base-used.cpp Sun Aug 8 00:07:06 2010
@@ -1,10 +1,11 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// PR7800
-class NoDestroy { ~NoDestroy(); }; // expected-note {{declared private here}}
+class NoDestroy { ~NoDestroy(); }; // expected-note 3 {{declared private here}}
struct A {
virtual ~A();
};
+
struct B : public virtual A {
NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
};
@@ -14,3 +15,28 @@
};
void D::foo() { // expected-note {{implicit default destructor for 'B' first required here}}
}
+
+struct E : public virtual A {
+ NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
+};
+struct F : public E { // expected-note {{implicit default destructor for 'E' first required here}}
+};
+struct G : public virtual F {
+ virtual void foo();
+ ~G();
+};
+void G::foo() { // expected-note {{implicit default destructor for 'F' first required here}}
+}
+
+struct H : public virtual A {
+ NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
+};
+struct I : public virtual H {
+ ~I();
+};
+struct J : public I {
+ virtual void foo();
+ ~J();
+};
+void J::foo() { // expected-note {{implicit default destructor for 'H' first required here}}
+}
More information about the cfe-commits
mailing list