[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 08:23:37 PDT 2024


================
@@ -19710,6 +19710,27 @@ bool Sema::IsLayoutCompatible(QualType T1, QualType T2) const {
   return isLayoutCompatible(getASTContext(), T1, T2);
 }
 
+//===-------------- Pointer interconvertibility ----------------------------//
+
+bool Sema::IsPointerInterconvertibleBaseOf(const TypeSourceInfo *Base,
+                                           const TypeSourceInfo *Derived) {
+  QualType BaseT = Base->getType().getCanonicalType().getUnqualifiedType();
+  QualType DerivedT =
+      Derived->getType().getCanonicalType().getUnqualifiedType();
----------------
Endilll wrote:

Suggestion applied. Thank you!

https://github.com/llvm/llvm-project/pull/88473


More information about the cfe-commits mailing list