rjmccall added inline comments.

================
Comment at: include/clang/AST/Type.h:337
+    Mask = (Mask & ~ImplicitAddrSpaceMask) |
+           (((uint32_t)Value) << ImplicitAddrSpaceShift);
+  }
----------------
This is probably cleaner as:

  Mask = (Value ? (Mask | ImplicitAddrSpaceMask) : (Mask & 
~ImplicitAddrSpaceMask));


================
Comment at: lib/AST/ASTContext.cpp:2290
+  if (CanT.getAddressSpace() == AddressSpace &&
+      CanT.getQualifiers().isAddressSpaceImplicit() == ImplicitFlag)
     return T;
----------------
It looks like your changes here are making implicitness part of the canonical 
type, which is wrong, because implicitly- and explicitly-qualified types are 
not actually different types.

That is fixable, but I'm going to ask you to investigate whether you can solve 
this problem with AttributedType before you introduce this complexity into the 
qualifier system.


https://reviews.llvm.org/D38857



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to