[cfe-commits] r122592 - /cfe/trunk/lib/Sema/SemaExpr.cpp

Abramo Bagnara abramo.bagnara at gmail.com
Tue Dec 28 01:13:41 PST 2010


Author: abramo
Date: Tue Dec 28 03:13:41 2010
New Revision: 122592

URL: http://llvm.org/viewvc/llvm-project?rev=122592&view=rev
Log:
Canonicalize types before possible cast.

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=122592&r1=122591&r2=122592&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Dec 28 03:13:41 2010
@@ -4501,7 +4501,8 @@
   // 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;
 





More information about the cfe-commits mailing list