[clang] [lldb] [BoundsSafety] Introduce LateParsedAttrType AST placeholder type (PR #204125)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 20:52:39 PDT 2026


================
@@ -3751,6 +3754,17 @@ QualType ASTContext::getCountAttributedType(
   return QualType(CATy, 0);
 }
 
+QualType ASTContext::getLateParsedAttrType(
+    QualType WrappedTy, LateParsedTypeAttribute *LateParsedAttr) const {
+  QualType CanonTy = getCanonicalType(WrappedTy);
+
+  auto *LPATy = new (*this, alignof(LateParsedAttrType))
+      LateParsedAttrType(WrappedTy, CanonTy, LateParsedAttr);
----------------
efriedma-quic wrote:

I think I'd like to see a comment explicitly mention this in the definition of the attribute.

I don't think I have any other concerns.

(In general, we're using sugar too much: there are existing issues where there are problems due to the usage of sugar.  Sugar is really not supposed to have semantics.  But I don't know of any problems applicable to bounds safety specifically.)

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


More information about the cfe-commits mailing list