Javier =?utf-8?q?Muñoz?= Kirschberg Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/157...@github.com>
================ @@ -16174,8 +16174,10 @@ void Sema::computeNRVO(Stmt *Body, FunctionScopeInfo *Scope) { for (unsigned I = 0, E = Scope->Returns.size(); I != E; ++I) { if (const VarDecl *NRVOCandidate = Returns[I]->getNRVOCandidate()) { if (!NRVOCandidate->isNRVOVariable()) { - Diag(Returns[I]->getRetValue()->getExprLoc(), - diag::warn_not_eliding_copy_on_return); + if (getLangOpts().CPlusPlus) { ---------------- Sirraide wrote: Ah, no, disregard that. I misread that because of how the diff was formatted; we do in fact need to keep them separate yes. https://github.com/llvm/llvm-project/pull/157059 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits