rusyaev-roman added inline comments.
================ Comment at: clang/include/clang/Sema/Scope.h:213-215 + /// A single NRVO candidate variable in this scope, or nullptr if the + /// candidate is not available/allowed in this scope. + Optional<VarDecl *> NRVO; ---------------- ChuanqiXu wrote: > Now NRVO has three states, None, nullptr and non-null value.But it doesn't > show in comments and implementations. Actually it's used. I'll add additional comments for clarification. ================ Comment at: clang/lib/Sema/Scope.cpp:151 +void Scope::applyNRVOAndMergeItIntoParent() { + if (!NRVO.hasValue()) + // There is no NRVO candidate in the current scope. ---------------- ChuanqiXu wrote: > nullptr should be considered below. I'll add a comment to demonstrate why it is. 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