================
@@ -398,8 +398,13 @@ void CIRGenModule::constructAttributeList(
     attrs.set(cir::CIRDialect::getSideEffectAttrName(),
               cir::SideEffectAttr::get(&getMLIRContext(), sideEffect));
 
-    // TODO(cir): When doing 'return attrs' we need to cover the Restrict and
-    // ReturnsNonNull attributes here.
+    if (targetDecl->hasAttr<ReturnsNonNullAttr>())
----------------
andykaylor wrote:

```suggestion
    if (targetDecl->hasAttr<ReturnsNonNullAttr>() && 
!codeGenOpts.NullPointerIsValid)
```

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

Reply via email to