diff options
author | Nicolas Lesser <blitzrakete@gmail.com> | 2018-10-25 20:15:03 +0000 |
---|---|---|
committer | Nicolas Lesser <blitzrakete@gmail.com> | 2018-10-25 20:15:03 +0000 |
commit | 3cde5e4a4c69bf21039a9d5fa65c929cdb9b993b (patch) | |
tree | beee024adbfc22f4d839808eccfdac5c3519d707 /clang/www | |
parent | f28e81f6aa3a815938100bc2efe1bf8887093ec8 (diff) |
[C++17] Reject shadowing of capture by parameter in lambda
Summary:
This change rejects the shadowing of a capture by a parameter in lambdas in C++17.
```
int main() {
int a;
auto f = [a](int a) { return a; };
}
```
results in:
```
main.cpp:3:20: error: a lambda parameter cannot shadow an explicitly captured entity
auto f = [a](int a) { return a; };
^
main.cpp:3:13: note: variable a is explicitly captured here
auto f = [a](int a) { return a; };
^
```
Reviewers: rsmith
Reviewed By: rsmith
Subscribers: lebedev.ri, erik.pilkington, cfe-commits
Differential Revision: https://reviews.llvm.org/D53595
llvm-svn: 345308
Diffstat (limited to 'clang/www')
-rwxr-xr-x | clang/www/cxx_dr_status.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index 44fdf8f17fe8..460978260f18 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -13081,7 +13081,7 @@ and <I>POD class</I></td> <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2211">2211</a></td> <td>C++17</td> <td>Hiding by lambda captures and parameters</td> - <td class="none" align="center">Unknown</td> + <td class="svn" align="center">SVN</td> </tr> <tr class="open" id="2212"> <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2212">2212</a></td> |