diff options
Diffstat (limited to 'lib/Sema/SemaExprMember.cpp')
-rw-r--r-- | lib/Sema/SemaExprMember.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprMember.cpp b/lib/Sema/SemaExprMember.cpp index 92cf619d92..54296942d0 100644 --- a/lib/Sema/SemaExprMember.cpp +++ b/lib/Sema/SemaExprMember.cpp @@ -173,7 +173,8 @@ static IMAKind ClassifyImplicitMemberAccess(Sema &SemaRef, // ...if C is not X or a base class of X, the class member access expression // is ill-formed. if (R.getNamingClass() && - contextClass != R.getNamingClass()->getCanonicalDecl() && + contextClass->getCanonicalDecl() != + R.getNamingClass()->getCanonicalDecl() && contextClass->isProvablyNotDerivedFrom(R.getNamingClass())) return (hasNonInstance ? IMA_Mixed_Unrelated : IMA_Error_Unrelated); |