This revision was automatically updated to reflect the committed changes.
Closed by commit rC353160: Fix ICE on reference binding with mismatching addr
spaces. (authored by stulova, committed by ).
Herald added a project: clang.
Changed prior to commit:
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Okay.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57524/new/
https://reviews.llvm.org/D57524
___
cfe-commits mailing list
Anastasia updated this revision to Diff 185024.
Anastasia added a comment.
- Renamed variables and made other changes to improve readability.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57524/new/
https://reviews.llvm.org/D57524
Files:
lib/Sema/SemaInit.cpp
rjmccall added inline comments.
Comment at: lib/Sema/SemaInit.cpp:4693
+T2Quals.addAddressSpace(AS2);
+ QualType WithAScv1T4 = S.Context.getQualifiedType(IgnoreAScv2T2,
T1Quals);
+ Sequence.AddQualificationConversionStep(WithAScv1T4, ValueKind);
Anastasia marked an inline comment as done.
Anastasia added inline comments.
Comment at: lib/Sema/SemaInit.cpp:4693
+T2Quals.addAddressSpace(AS2);
+ QualType WithAScv1T4 = S.Context.getQualifiedType(IgnoreAScv2T2,
T1Quals);
+
rjmccall added inline comments.
Comment at: lib/Sema/SemaInit.cpp:4693
+T2Quals.addAddressSpace(AS2);
+ QualType WithAScv1T4 = S.Context.getQualifiedType(IgnoreAScv2T2,
T1Quals);
+ Sequence.AddQualificationConversionStep(WithAScv1T4, ValueKind);
Anastasia created this revision.
Anastasia added a reviewer: rjmccall.
If `cv2T2` has an address space and we are creating a qualified type `cv1T4`
adding new addr space qualifier an ICE is triggered.
To avoid this ICE we first create a duplicate of `cv2T2` omitting its original
addr space.