diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaCXXCast.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp index 045ffb20de..800c544d33 100644 --- a/lib/Sema/SemaCXXCast.cpp +++ b/lib/Sema/SemaCXXCast.cpp @@ -959,8 +959,9 @@ static TryCastResult TryConstCast(Sema &Self, Expr *SrcExpr, QualType DestType, // as must be the final pointee type. while (SrcType != DestType && Self.UnwrapSimilarPointerTypes(SrcType, DestType)) { - SrcType = SrcType.getUnqualifiedType(); - DestType = DestType.getUnqualifiedType(); + Qualifiers Quals; + SrcType = Self.Context.getUnqualifiedArrayType(SrcType, Quals); + DestType = Self.Context.getUnqualifiedArrayType(DestType, Quals); } // Since we're dealing in canonical types, the remainder must be the same. |