From 3d5ba159c6e390c93817e11866e91af37ee3196d Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 5 Oct 2023 10:43:32 +0200 Subject: [PATCH] Desugar UnaryTransformType This fixes PyROOT's handling of smart pointers, such as shared_ptr, with the new macOS SDK 14.0 resulting in a remove_extent transform. --- lib/Utils/AST.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/Utils/AST.cpp b/lib/Utils/AST.cpp index 0ff79a8d..d805b6b8 100644 --- a/lib/Utils/AST.cpp +++ b/lib/Utils/AST.cpp @@ -788,13 +788,12 @@ namespace utils { return false; } case Type::UnaryTransform: { + const UnaryTransformType* Ty = llvm::cast(QTy); + if (Ty->isSugared()) { + QT = Ty->desugar(); + return true; + } return false; - //const UnaryTransformType* Ty = llvm::cast(QTy); - //if (Ty->isSugared()) { - // QT = Ty->desugar(); - // return true; - //} - //return false; } case Type::Auto: { return false;