comparison clang/test/FixIt/fixit-c++11.cpp @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children 1f2b6ac9f198
comparison
equal deleted inserted replaced
173:0572611fdcc8 207:2e18cbf3894f
54 54
55 void S2::f(int i) { 55 void S2::f(int i) {
56 (void)[&, &i, &i]{}; // expected-error 2{{'&' cannot precede a capture when the capture default is '&'}} 56 (void)[&, &i, &i]{}; // expected-error 2{{'&' cannot precede a capture when the capture default is '&'}}
57 (void)[i, i]{ }; // expected-error{{'i' can appear only once in a capture list}} 57 (void)[i, i]{ }; // expected-error{{'i' can appear only once in a capture list}}
58 (void)[&, i, i]{ }; // expected-error{{'i' can appear only once in a capture list}} 58 (void)[&, i, i]{ }; // expected-error{{'i' can appear only once in a capture list}}
59 (void)[] mutable { }; // expected-error{{lambda requires '()' before 'mutable'}} 59 (void)[] mutable {};
60 (void)[] -> int { }; // expected-error{{lambda requires '()' before return type}} 60 (void)[]->int{};
61 #if __cplusplus <= 202002L
62 // expected-warning@-3{{is a C++2b extension}}
63 // expected-warning@-3{{is a C++2b extension}}
64 #endif
61 65
62 delete []() { return new int; }(); // expected-error{{'[]' after delete interpreted as 'delete[]'}} 66 delete []() { return new int; }(); // expected-error{{'[]' after delete interpreted as 'delete[]'}}
63 delete [] { return new int; }(); // expected-error{{'[]' after delete interpreted as 'delete[]'}} 67 delete [] { return new int; }(); // expected-error{{'[]' after delete interpreted as 'delete[]'}}
64 } 68 }
65 69