aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/primary-base.cpp
blob: d305aa3b72db83337d5ede900f9e4e4a80c3c32a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -verify %s
// expected-no-diagnostics
class A { virtual void f(); };
class B : virtual A { };

class C : B { };

// Since A is already a primary base class, C should be the primary base class
// of F.
class F : virtual A, virtual C { };

int sa[sizeof(F) == sizeof(A) ? 1 : -1];