diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-06-30 17:34:52 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-06-30 17:34:52 +0000 |
commit | 9da7201adeab345fc7da72bcfcf30e11774fb8c4 (patch) | |
tree | 8091fb8c1e88f6b91355d0bddc9a8d1a841f53f6 /test/SemaCXX/constructor-initializer.cpp | |
parent | b33fe2ff12676bff9db595fdf77e29014d7ba397 (diff) |
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
Diffstat (limited to 'test/SemaCXX/constructor-initializer.cpp')
-rw-r--r-- | test/SemaCXX/constructor-initializer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp index d0c978a80d..d8b95cec4c 100644 --- a/test/SemaCXX/constructor-initializer.cpp +++ b/test/SemaCXX/constructor-initializer.cpp @@ -54,3 +54,15 @@ class H : A { 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'}} +}; + |