================
@@ -7519,6 +7519,26 @@ static bool 
HandleWebAssemblyFuncrefAttr(TypeProcessingState &State,
   return false;
 }
 
+/// Rebuild an attributed type without the nullability attribute on it.
+static QualType rebuildAttributedTypeWithoutNullability(ASTContext &Ctx,
+                                                        QualType Type) {
+  auto Attributed = dyn_cast<AttributedType>(Type.getTypePtr());
+  if (!Attributed)
+    return Type;
+
+  // Skip the nullability attribute; we're done.
+  if (Attributed->getImmediateNullability()) {
+    return Attributed->getModifiedType();
+  }
+
+  // Build the modified type.
+  auto Modified = rebuildAttributedTypeWithoutNullability(
----------------
egorzhdan wrote:

This is a `QualType`, added the explicit type.

https://github.com/llvm/llvm-project/pull/73017
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to