[PATCH] D57524: Fix ICE on attempt to add an addr space qual to a type qualified by an addr space

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 1 03:25:30 PST 2019


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);
+      Sequence.AddQualificationConversionStep(WithAScv1T4, ValueKind);
----------------
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!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57524/new/

https://reviews.llvm.org/D57524





More information about the cfe-commits mailing list