rsmith created this revision.
rsmith added a reviewer: rjmccall.
DR330: when determining whether a cast casts away constness, consider
qualifiers from all levels matching a multidimensional array.
For example, this allows casting from
pointer to array ofarray of const volat
rjmccall added inline comments.
Comment at: lib/Sema/SemaCast.cpp:535
+T1 = Unwrap(T1);
+T2 = Unwrap(T2).withCVRQualifiers(T2.getCVRQualifiers());
+ }
Hmm. Just CVR? I understand that we can have problems here with the
enumerated qualifiers, so maybe
rsmith added inline comments.
Comment at: lib/Sema/SemaCast.cpp:535
+T1 = Unwrap(T1);
+T2 = Unwrap(T2).withCVRQualifiers(T2.getCVRQualifiers());
+ }
rjmccall wrote:
> Hmm. Just CVR? I understand that we can have problems here with the
> enumerated qua
rjmccall added inline comments.
Comment at: lib/Sema/SemaCast.cpp:535
+T1 = Unwrap(T1);
+T2 = Unwrap(T2).withCVRQualifiers(T2.getCVRQualifiers());
+ }
rsmith wrote:
> rjmccall wrote:
> > Hmm. Just CVR? I understand that we can have problems here with t
davezarzycki added a comment.
Hi @rsmith – I've verified this patch fixes the original issue. Thanks for the
quick fix!
Repository:
rC Clang
https://reviews.llvm.org/D49457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llv
This revision was not accepted when it landed; it landed in state "Needs
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rC337422: DR330: when determining whether a cast casts away
constness, consider (authored by rsmith, committed by ).
Reposi