[cfe-commits] r166619 - in /cfe/trunk/test: Parser/cxx0x-lambda-expressions.cpp SemaCXX/explicit.cpp SemaCXX/lambda-expressions.cpp
Eli Friedman
eli.friedman at gmail.com
Wed Oct 24 13:28:18 PDT 2012
Author: efriedma
Date: Wed Oct 24 15:28:18 2012
New Revision: 166619
URL: http://llvm.org/viewvc/llvm-project?rev=166619&view=rev
Log:
Update regression tests for r166617.
Modified:
cfe/trunk/test/Parser/cxx0x-lambda-expressions.cpp
cfe/trunk/test/SemaCXX/explicit.cpp
cfe/trunk/test/SemaCXX/lambda-expressions.cpp
Modified: cfe/trunk/test/Parser/cxx0x-lambda-expressions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx0x-lambda-expressions.cpp?rev=166619&r1=166618&r2=166619&view=diff
==============================================================================
--- cfe/trunk/test/Parser/cxx0x-lambda-expressions.cpp (original)
+++ cfe/trunk/test/Parser/cxx0x-lambda-expressions.cpp Wed Oct 24 15:28:18 2012
@@ -34,7 +34,7 @@
typedef int T;
const int b = 0;
const int c = 1;
- int a1[1] = {[b] (T()) {}}; // expected-error{{no viable conversion from 'C::<lambda}}
+ int a1[1] = {[b] (T()) {}}; // expected-error{{no viable conversion from '<lambda}}
int a2[1] = {[b] = 1 };
int a3[1] = {[b,c] = 1 }; // expected-error{{expected body of lambda expression}}
int a4[1] = {[&b] = 1 }; // expected-error{{integral constant expression must have integral or unscoped enumeration type, not 'const int *'}}
Modified: cfe/trunk/test/SemaCXX/explicit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/explicit.cpp?rev=166619&r1=166618&r2=166619&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/explicit.cpp (original)
+++ cfe/trunk/test/SemaCXX/explicit.cpp Wed Oct 24 15:28:18 2012
@@ -40,10 +40,10 @@
void testExplicit()
{
// Taken from 12.3.2p2
- class Y { }; // expected-note {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Conversion::Z' to 'const Conversion::Y &' for 1st argument}} \
- expected-note {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'Conversion::Z' to 'Conversion::Y &&' for 1st argument}} \
- expected-note {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Conversion::Z' to 'const Conversion::Y &' for 1st argument}} \
- expected-note {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'Conversion::Z' to 'Conversion::Y &&' for 1st argument}}
+ class Y { }; // expected-note {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Z' to 'const Y &' for 1st argument}} \
+ expected-note {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'Z' to 'Y &&' for 1st argument}} \
+ expected-note {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Z' to 'const Y &' for 1st argument}} \
+ expected-note {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'Z' to 'Y &&' for 1st argument}}
struct Z {
explicit operator Y() const;
@@ -52,7 +52,7 @@
Z z;
// 13.3.1.4p1 & 8.5p16:
- Y y2 = z; // expected-error {{no viable conversion from 'Conversion::Z' to 'Conversion::Y'}}
+ Y y2 = z; // expected-error {{no viable conversion from 'Z' to 'Y'}}
Y y3 = (Y)z;
Y y4 = Y(z);
Y y5 = static_cast<Y>(z);
@@ -62,7 +62,7 @@
int i3 = static_cast<int>(z);
int i4(z);
// 13.3.1.6p1 & 8.5.3p5:
- const Y& y6 = z; // expected-error {{no viable conversion from 'Conversion::Z' to 'const Conversion::Y'}}
+ const Y& y6 = z; // expected-error {{no viable conversion from 'Z' to 'const Y'}}
const int& y7(z);
}
@@ -78,7 +78,7 @@
NotBool n;
(void) (1 + b);
- (void) (1 + n); // expected-error {{invalid operands to binary expression ('int' and 'Conversion::NotBool')}}
+ (void) (1 + n); // expected-error {{invalid operands to binary expression ('int' and 'NotBool')}}
// 5.3.1p9:
(void) (!b);
@@ -105,7 +105,7 @@
// 6.4.2p2:
switch (b) {} // expected-warning {{switch condition has boolean value}}
- switch (n) {} // expected-error {{switch condition type 'Conversion::NotBool' requires explicit conversion to 'bool'}} \
+ switch (n) {} // expected-error {{switch condition type 'NotBool' requires explicit conversion to 'bool'}} \
expected-warning {{switch condition has boolean value}}
// 6.5.1:
@@ -135,7 +135,7 @@
NotInt ni;
new int[i];
- new int[ni]; // expected-error {{array size expression of type 'Conversion::NotInt' requires explicit conversion to type 'int'}}
+ new int[ni]; // expected-error {{array size expression of type 'NotInt' requires explicit conversion to type 'int'}}
}
void testDelete()
@@ -152,7 +152,7 @@
NotPtr np;
delete p;
- delete np; // expected-error {{cannot delete expression of type 'Conversion::NotPtr'}}
+ delete np; // expected-error {{cannot delete expression of type 'NotPtr'}}
}
void testFunctionPointer()
@@ -170,6 +170,6 @@
FP fp;
NotFP nfp;
fp(1);
- nfp(1); // expected-error {{type 'Conversion::NotFP' does not provide a call operator}}
+ nfp(1); // expected-error {{type 'NotFP' does not provide a call operator}}
}
}
Modified: cfe/trunk/test/SemaCXX/lambda-expressions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/lambda-expressions.cpp?rev=166619&r1=166618&r2=166619&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/lambda-expressions.cpp (original)
+++ cfe/trunk/test/SemaCXX/lambda-expressions.cpp Wed Oct 24 15:28:18 2012
@@ -77,8 +77,8 @@
struct G { G(); G(G&); int a; }; // expected-note 6 {{not viable}}
G g;
[=]() { const G* gg = &g; return gg->a; };
- [=]() { return [=]{ const G* gg = &g; return gg->a; }(); }; // expected-error {{no matching constructor for initialization of 'ImplicitCapture::G'}}
- (void)^{ return [=]{ const G* gg = &g; return gg->a; }(); }; // expected-error 2 {{no matching constructor for initialization of 'const ImplicitCapture::G'}}
+ [=]() { return [=]{ const G* gg = &g; return gg->a; }(); }; // expected-error {{no matching constructor for initialization of 'G'}}
+ (void)^{ return [=]{ const G* gg = &g; return gg->a; }(); }; // expected-error 2 {{no matching constructor for initialization of 'const G'}}
const int h = a; // expected-note {{declared}}
[]() { return h; }; // expected-error {{variable 'h' cannot be implicitly captured in a lambda with no capture-default specified}} expected-note {{lambda expression begins here}}
More information about the cfe-commits
mailing list