summaryrefslogtreecommitdiff
path: root/test/FixIt
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2017-08-19 03:43:07 +0000
committerFaisal Vali <faisalv@yahoo.com>2017-08-19 03:43:07 +0000
commit477f579e67f1eb7da7e9df0b6d01e3ae70508859 (patch)
treef627e0ab4c6a8f24da77120372dd4b7295528daf /test/FixIt
parentc15e70eae870a8683089e94c1cc6e9c238a094a6 (diff)
[c++2a] Implement P0409R2 - Allow lambda capture [=,this] (by hamzasood)
This patch, by hamzasood, implements P0409R2, and allows [=, this] pre-C++2a as an extension (with appropriate warnings) for consistency. https://reviews.llvm.org/D36572 Thanks Hamza! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt')
-rw-r--r--test/FixIt/fixit-cxx0x.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp
index 5aebcb3def..337b5d62be 100644
--- a/test/FixIt/fixit-cxx0x.cpp
+++ b/test/FixIt/fixit-cxx0x.cpp
@@ -54,7 +54,6 @@ struct S2 {
void S2::f(int i) {
(void)[&, &i, &i]{}; // expected-error 2{{'&' cannot precede a capture when the capture default is '&'}}
- (void)[=, this]{ this->g(5); }; // expected-error{{'this' cannot be explicitly captured}}
(void)[i, i]{ }; // expected-error{{'i' can appear only once in a capture list}}
(void)[&, i, i]{ }; // expected-error{{'i' can appear only once in a capture list}}
(void)[] mutable { }; // expected-error{{lambda requires '()' before 'mutable'}}