[PATCH] D40218: [Clang] Add __builtin_launder

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 14 11:34:32 PDT 2018


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

LGTM with a fix (and test) for pointer-to-array-of-dynamic-class-type handling.



================
Comment at: lib/CodeGen/CGBuiltin.cpp:936-938
+  const auto *Record = Ty->getAsCXXRecordDecl();
+  if (!Record || !Seen.insert(Record).second)
+    return false;
----------------
I think you also need to recurse through array types (use `Ty->getBaseElementTypeUnsafe()->getAsCXXRecordDecl()` or similar).


https://reviews.llvm.org/D40218





More information about the cfe-commits mailing list