diff options
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index e5df6c1bf33..1604a70d525 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -4578,7 +4578,7 @@ QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, return QualType(); } - if (!IsDerivedFrom(LHSType, Class)) { + if (!IsDerivedFrom(Loc, LHSType, Class)) { Diag(Loc, diag::err_bad_memptr_lhs) << OpSpelling << (int)isIndirect << LHS.get()->getType(); return QualType(); @@ -4706,9 +4706,9 @@ static bool TryClassUnification(Sema &Self, Expr *From, Expr *To, const RecordType *FRec = FTy->getAs<RecordType>(); const RecordType *TRec = TTy->getAs<RecordType>(); bool FDerivedFromT = FRec && TRec && FRec != TRec && - Self.IsDerivedFrom(FTy, TTy); - if (FRec && TRec && - (FRec == TRec || FDerivedFromT || Self.IsDerivedFrom(TTy, FTy))) { + Self.IsDerivedFrom(QuestionLoc, FTy, TTy); + if (FRec && TRec && (FRec == TRec || FDerivedFromT || + Self.IsDerivedFrom(QuestionLoc, TTy, FTy))) { // E1 can be converted to match E2 if the class of T2 is the // same type as, or a base class of, the class of T1, and // [cv2 > cv1]. |