mirror of
https://github.com/intel/llvm.git
synced 2026-02-02 02:00:03 +08:00
Canonicalize types before possible cast.
llvm-svn: 122592
This commit is contained in:
@@ -4501,7 +4501,8 @@ static CastKind PrepareScalarCast(Sema &S, Expr *&Src, QualType DestTy) {
|
||||
// Also, callers should have filtered out the invalid cases with
|
||||
// pointers. Everything else should be possible.
|
||||
|
||||
QualType SrcTy = Src->getType();
|
||||
QualType SrcTy = S.Context.getCanonicalType(Src->getType());
|
||||
DestTy = S.Context.getCanonicalType(DestTy);
|
||||
if (S.Context.hasSameUnqualifiedType(SrcTy, DestTy))
|
||||
return CK_NoOp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user