[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
================
@@ -7246,6 +7250,24 @@ QualType TreeTransform<Derived>::TransformDependentBitIntType(
return Result;
}
+template <typename Derived>
+QualType TreeTransform<Derived>::TransformPredefinedSugarType(
+ TypeLocBuilder &TLB, PredefinedSugarTypeLoc TL) {
+ const PredefinedSugarType *EIT = TL.getTypePtr();
+ QualType Result = TL.getType();
+
+ if (getDerived().AlwaysRebuild()) {
+ Result = getDerived().RebuildPredefinedSugarType(
+ EIT->getKind(), EIT->desugar(), TL.getNameLoc());
+ if (Result.isNull())
+ return QualType();
+ }
----------------
mizvekov wrote:
If this had an underlying type, then this would need to transform that as well. But if not, I don't think you should bother transforming anything, just rebuild inline.
https://github.com/llvm/llvm-project/pull/143653
More information about the cfe-commits
mailing list