[clang] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 14 00:42:31 PDT 2025


================
@@ -1894,6 +1894,12 @@ ExpectedType clang::ASTNodeImporter::VisitDependentBitIntType(
                                                         *ToNumBitsExprOrErr);
 }
 
+ExpectedType clang::ASTNodeImporter::VisitPredefinedSugarType(
+    const clang::PredefinedSugarType *T) {
+  return Importer.getToContext().getPredefinedSugarType(T->getKind(),
+                                                        T->desugar());
----------------
mizvekov wrote:

You have to import the underlying type first, you can't directly use an AST node from a different context.

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


More information about the cfe-commits mailing list