[PATCH] D76396: Allow immediate invocation of constructors

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 18 18:28:40 PDT 2020


rsmith added inline comments.


================
Comment at: clang/lib/Sema/SemaInit.cpp:6466
     if (Entity.allowsNRVO())
       CurInit = S.BuildCXXConstructExpr(Loc, Step.Type,
                                         Step.Function.FoundDecl,
----------------
It looks like the other callers to `BuildCXXConstructExpr` are also missing this handling. Can we put the call to `CheckForImmediateInvocation` in `BuildCXXConstructExpr` to handle all those cases at once, or do we need to defer it until after the other stuff below?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76396/new/

https://reviews.llvm.org/D76396





More information about the cfe-commits mailing list