[PATCH] D57076: [ObjC generics] Fix applying `__kindof` to the type parameter.

Doug Gregor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 23 21:56:13 PST 2019


doug.gregor accepted this revision.
doug.gregor added a comment.
This revision is now accepted and ready to land.

One minor request about regarding a dyn_cast, but this looks like the right approach. Thank you!



================
Comment at: clang/lib/AST/Type.cpp:1293
+
+    const auto *newAttrType = dyn_cast<AttributedType>(newType.getTypePtr());
+    if (newAttrType->getAttrKind() != attr::ObjCKindOf)
----------------
Either this should be a `cast<AttributedType>` or the next if should check for !newAttrType. I suspect the latter is safer.


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

https://reviews.llvm.org/D57076





More information about the cfe-commits mailing list