Correctly initialize the PrimaryBaseInfo if a base is null. Fixes PR5832.
llvm-svn: 91748
This commit is contained in:
parent
7173903ea6
commit
6fda43f4c1
|
@ -53,7 +53,7 @@ public:
|
|||
PrimaryBaseInfo() {}
|
||||
|
||||
PrimaryBaseInfo(const CXXRecordDecl *Base, bool IsVirtual)
|
||||
: Value(Base, IsVirtual) {}
|
||||
: Value(Base, Base && IsVirtual) {}
|
||||
|
||||
/// Value - Points to the primary base. The single-bit value
|
||||
/// will be non-zero when the primary base is virtual.
|
||||
|
|
|
@ -9,3 +9,11 @@ void f(A *a) {
|
|||
// CHECK: call void %
|
||||
a->f('c');
|
||||
}
|
||||
|
||||
struct B : virtual A {
|
||||
virtual void f();
|
||||
};
|
||||
|
||||
void f(B * b) {
|
||||
b->f();
|
||||
}
|
Loading…
Reference in New Issue