================
@@ -796,6 +796,20 @@ static void instantiateDependentHLSLParamModifierAttr(
       "out or inout parameter type must be a reference and restrict 
qualified");
 }
 
+static void instantiateDependentMallocSpanAttr(Sema &S,
+                                               const MallocSpanAttr *Attr,
+                                               Decl *New) {
+  QualType RT = getFunctionOrMethodResultType(New);
+  if (RT->isDependentType()) {
+    // The type is still dependent.
----------------
erichkeane wrote:

Same regarding comments & curleys, comments aren't adding anything.  AND if the 
dependence check is in the check function, this all becomes:

```
if (!CheckSpanLikeType(...))
New->addAttr(...);
```

vastly simplifying & removing repetition

https://github.com/llvm/llvm-project/pull/167010
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to