ChuanqiXu added a comment. I've looked into the details as much as I can and I don't find explicit errors.
--- It is better to add tests in clang/unittest by using `VarDecl::isNRVOVariable()`. ================ Comment at: clang/include/clang/Sema/Scope.h:533-535 + if (NRVO.getPointer() != nullptr && NRVO.getPointer() != NewNRVO) + NRVO.setInt(true); + NRVO.setPointer(NewNRVO); ---------------- The suggested changes smell better. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119792/new/ https://reviews.llvm.org/D119792 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits