summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2017-02-16 04:12:21 +0000
committerFaisal Vali <faisalv@yahoo.com>2017-02-16 04:12:21 +0000
commit051e3a2b7d51946de1e1d39c687cba34ef276617 (patch)
treefce2648691ba29cf38b2283a08c8a65dc3ea1135 /clang/lib/Basic/SourceManager.cpp
parentda5cc8466186b15f31db3c7c98c4f0eee3ad7ced (diff)
downloadbcm5719-llvm-051e3a2b7d51946de1e1d39c687cba34ef276617.tar.gz
bcm5719-llvm-051e3a2b7d51946de1e1d39c687cba34ef276617.zip
[cxx1z-constexpr-lambda] Implement captures - thus completing implementation of constexpr lambdas.
Enable evaluation of captures within constexpr lambdas by using a strategy similar to that used in CodeGen: - when starting evaluation of a lambda's call operator, create a map from VarDecl's to a closure's FieldDecls - every time a VarDecl (or '*this) that represents a capture is encountered while evaluating the expression via the expression evaluator (specifically the LValueEvaluator) in ExprConstant.cpp - it is replaced by the corresponding FieldDecl LValue (an Lvalue-to-Rvalue conversion on this LValue representation then determines the right rvalue when needed). Thanks to Richard Smith and Hubert Tong for their review and feedback! https://reviews.llvm.org/D29748 llvm-svn: 295279
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud