[clang] NRVO: Improvements and handling of more cases.
This expands NRVO propagation for more cases:
Parse analysis improvement:
- Lambdas and Blocks with dependent return type can have their variables marked as NRVO Candidates.
Variable instantiation improvements:
- Fixes crash when instantiating NRVO variables in Blocks.
- Functions, Lambdas, and Blocks which have auto return type have their variables' NRVO status propagated. For Blocks with non-auto return type, as a limitation, this propagation does not consider the actual return type.
This also implements exclusion of VarDecls which are references to
Signed-off-by: Matheus Izvekov <email@example.com>
Reviewed By: Quuxplusone
Differential Revision: https://reviews.llvm.org/D99696