diff options
author | Manman Ren <manman.ren@gmail.com> | 2016-07-01 22:27:16 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2016-07-01 22:27:16 +0000 |
commit | ebe8cf55ac975e092c4fff131346b304afeada72 (patch) | |
tree | f0fb3b7b5deafa6be130318d5faa37650faf9526 /lldb/packages/Python/lldbsuite/test | |
parent | ad56ea31294fd06475b99d0531f94566a1988c90 (diff) | |
download | bcm5719-llvm-ebe8cf55ac975e092c4fff131346b304afeada72.tar.gz bcm5719-llvm-ebe8cf55ac975e092c4fff131346b304afeada72.zip |
C++14 init-capture: error out instead of crashing.
When we have template arguments, we have a function and a pattern, the variable
in init-capture belongs to the pattern decl when checking if the lhs of
"max = current" is modifiable:
auto find = [max = init](auto current) {
max = current;
};
In function isReferenceToNonConstCapture, we handle the case where the decl
context for the variable is not part of the current context.
Instead of crashing, we emit an error message:
cannot assign to a variable captured by copy in a non-mutable lambda
rdar://26997922
llvm-svn: 274392
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
0 files changed, 0 insertions, 0 deletions