File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,20 @@ static bool areBinaryOperatorOperandsTypesEqual(const Expr *E,
57
57
if (!WithoutImplicitAndParen)
58
58
return false ;
59
59
if (const auto *B = dyn_cast<BinaryOperator>(WithoutImplicitAndParen)) {
60
- const QualType NonReferenceType =
61
- WithoutImplicitAndParen->getType ().getNonReferenceType ();
62
- if (!areTypesEquals (
63
- B->getLHS ()->IgnoreImplicit ()->getType ().getNonReferenceType (),
64
- NonReferenceType, IgnoreTypeAliases))
60
+ const QualType Type = WithoutImplicitAndParen->getType ();
61
+ if (Type.isNull ())
62
+ return false ;
63
+
64
+ const QualType NonReferenceType = Type.getNonReferenceType ();
65
+ const QualType LHSType = B->getLHS ()->IgnoreImplicit ()->getType ();
66
+ if (!LHSType.isNull () &&
67
+ !areTypesEquals (LHSType.getNonReferenceType (), NonReferenceType,
68
+ IgnoreTypeAliases))
65
69
return true ;
66
- if (!areTypesEquals (
67
- B->getRHS ()->IgnoreImplicit ()->getType ().getNonReferenceType (),
68
- NonReferenceType, IgnoreTypeAliases))
70
+ const QualType RHSType = B->getRHS ()->IgnoreImplicit ()->getType ();
71
+ if (!RHSType.isNull () &&
72
+ !areTypesEquals (RHSType.getNonReferenceType (), NonReferenceType,
73
+ IgnoreTypeAliases))
69
74
return true ;
70
75
}
71
76
return false ;
You can’t perform that action at this time.
0 commit comments