diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaCast.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaCast.cpp b/lib/Sema/SemaCast.cpp index 6f3937353c..28b58279a5 100644 --- a/lib/Sema/SemaCast.cpp +++ b/lib/Sema/SemaCast.cpp @@ -1479,6 +1479,8 @@ void Sema::CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType, static void DiagnoseCastOfObjCSEL(Sema &Self, const ExprResult &SrcExpr, QualType DestType) { QualType SrcType = SrcExpr.get()->getType(); + if (Self.Context.hasSameType(SrcType, DestType)) + return; if (const PointerType *SrcPtrTy = SrcType->getAs<PointerType>()) if (SrcPtrTy->isObjCSelType()) { QualType DT = DestType; |