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 wrote: > rjmccall wrote: > > `Qualifiers::addQualifiers` should let you do this in a single step. Also, > > you seem to be modifying `T2Quals` here after the last use of it. > Ok, I will update to use Qualifies methods directly. > > As for `T2Quals` I was thinking it might make sense to restore the original > value in case some code later will be added to use it (to prevent bugs)... > but may be it's too hypothetical. :) > > Thanks! That's not unreasonable, but if you're going to do that, you should do it unconditionally, not just in a `AS1 != AS2` block — or better yet, make new locals for `T1QualsWithoutAS`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57524/new/ https://reviews.llvm.org/D57524 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits