================
@@ -445,8 +445,8 @@ mlir::LogicalResult CIRGenFunction::emitReturnStmt(const 
ReturnStmt &s) {
 
   if (getContext().getLangOpts().ElideConstructors && s.getNRVOCandidate() &&
       s.getNRVOCandidate()->isNRVOVariable()) {
-    getCIRGenModule().errorNYI(s.getSourceRange(),
-                               "named return value optimization");
+    assert(!cir::MissingFeatures::openMP());
+    assert(!cir::MissingFeatures::nrvo());
----------------
andykaylor wrote:

This should set a flag if there is an associated NRVO candidate based on a map 
in CIRGenFunction, but that isn't implemented yet. The case where the variable 
would have been added to the map triggers an `errorNYI` diagnostic in 
`emitCXXConstructExpr` so it's safe to ignore it here until it is implemented.

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

Reply via email to