commit | 9da7201adeab345fc7da72bcfcf30e11774fb8c4 | [log] [tgz] |
---|---|---|
author | Fariborz Jahanian <fjahanian@apple.com> | Tue Jun 30 17:34:52 2009 +0000 |
committer | Fariborz Jahanian <fjahanian@apple.com> | Tue Jun 30 17:34:52 2009 +0000 |
tree | 8091fb8c1e88f6b91355d0bddc9a8d1a841f53f6 | |
parent | b33fe2ff12676bff9db595fdf77e29014d7ba397 [diff] [blame] |
More diagnostics related to initialization of direct bases in ctor-initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74541 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp index d0c978a..d8b95ce 100644 --- a/test/SemaCXX/constructor-initializer.cpp +++ b/test/SemaCXX/constructor-initializer.cpp
@@ -54,3 +54,15 @@ H::H() : A(10) { } + +class X {}; +class Y {}; + +struct S : Y, virtual X { + S (); +}; + +struct Z : S { + Z() : S(), X(), E() {} // expected-error {{type 'class E' is not a direct or virtual base of 'Z'}} +}; +