Skip to content

Commit 0a1f839

Browse files
committed
Add clang test-result
1 parent def7cba commit 0a1f839

File tree

1 file changed

+112
-0
lines changed

1 file changed

+112
-0
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
pure2-expected-is-as.cpp2:7:22: error: expected '(' for function-style cast or type construction
2+
std::expected<int,int> ex1 {123};
3+
~~~^
4+
pure2-expected-is-as.cpp2:7:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'?
5+
std::expected<int,int> ex1 {123};
6+
~~~~~^~~~~~~~
7+
unexpected
8+
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:92:8: note: 'unexpected' declared here
9+
void unexpected() __attribute__ ((__noreturn__));
10+
^
11+
pure2-expected-is-as.cpp2:8:22: error: expected '(' for function-style cast or type construction
12+
std::expected<int,int> ex2 {std::unexpected(-1)};
13+
~~~^
14+
pure2-expected-is-as.cpp2:8:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'?
15+
std::expected<int,int> ex2 {std::unexpected(-1)};
16+
~~~~~^~~~~~~~
17+
unexpected
18+
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:92:8: note: 'unexpected' declared here
19+
void unexpected() __attribute__ ((__noreturn__));
20+
^
21+
pure2-expected-is-as.cpp2:9:30: error: expected '(' for function-style cast or type construction
22+
std::expected<std::string,size_t> ex3 {"Expect the unexpected"};
23+
~~~~~~~~~~~^
24+
pure2-expected-is-as.cpp2:9:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'?
25+
std::expected<std::string,size_t> ex3 {"Expect the unexpected"};
26+
~~~~~^~~~~~~~
27+
unexpected
28+
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:92:8: note: 'unexpected' declared here
29+
void unexpected() __attribute__ ((__noreturn__));
30+
^
31+
pure2-expected-is-as.cpp2:11:23: error: use of undeclared identifier 'ex1'; did you mean 'exp'?
32+
if (cpp2::is<int>(ex1)) {
33+
^~~
34+
exp
35+
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here
36+
__MATHCALL_VEC (exp,, (_Mdouble_ __x));
37+
^
38+
pure2-expected-is-as.cpp2:15:24: error: use of undeclared identifier 'ex1'; did you mean 'exp'?
39+
if (cpp2::is<bool>(ex1)) {
40+
^~~
41+
exp
42+
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here
43+
__MATHCALL_VEC (exp,, (_Mdouble_ __x));
44+
^
45+
pure2-expected-is-as.cpp2:20:24: error: use of undeclared identifier 'ex1'; did you mean 'exp'?
46+
if (cpp2::is<void>(ex1)) {
47+
^~~
48+
exp
49+
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here
50+
__MATHCALL_VEC (exp,, (_Mdouble_ __x));
51+
^
52+
pure2-expected-is-as.cpp2:25:23: error: 'unexpected' does not name a template but is followed by template arguments
53+
if (cpp2::is<std::unexpected<int>>(ex1)) {
54+
^ ~~~~~
55+
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/exception:92:8: note: non-template declaration found by name lookup
56+
void unexpected() __attribute__ ((__noreturn__));
57+
^
58+
pure2-expected-is-as.cpp2:25:40: error: use of undeclared identifier 'ex1'; did you mean 'exp'?
59+
if (cpp2::is<std::unexpected<int>>(ex1)) {
60+
^~~
61+
exp
62+
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here
63+
__MATHCALL_VEC (exp,, (_Mdouble_ __x));
64+
^
65+
pure2-expected-is-as.cpp2:30:18: error: use of undeclared identifier 'ex1'; did you mean 'exp'?
66+
if (cpp2::is(ex1, 123)) {
67+
^~~
68+
exp
69+
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here
70+
__MATHCALL_VEC (exp,, (_Mdouble_ __x));
71+
^
72+
pure2-expected-is-as.cpp2:34:18: error: use of undeclared identifier 'ex1'; did you mean 'exp'?
73+
if (cpp2::is(ex1, 100)) {
74+
^~~
75+
exp
76+
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:95:17: note: 'exp' declared here
77+
__MATHCALL_VEC (exp,, (_Mdouble_ __x));
78+
^
79+
In file included from pure2-expected-is-as.cpp:7:
80+
../../../include/cpp2util.h:1597:72: error: invalid application of 'sizeof' to a function type
81+
(std::is_floating_point_v<From> && std::is_floating_point_v<To> && sizeof(From) > sizeof(To)) ||
82+
^~~~~~~~~~~~
83+
../../../include/cpp2util.h:2111:19: note: in instantiation of variable template specialization 'cpp2::is_narrowing_v' requested here
84+
if constexpr (is_narrowing_v<C, CPP2_TYPEOF(x)>) {
85+
^
86+
pure2-expected-is-as.cpp2:39:22: note: in instantiation of function template specialization 'cpp2::as_<int, double (&)(double) noexcept>' requested here
87+
auto val1 {cpp2::as_<int>(ex1)};
88+
^
89+
In file included from pure2-expected-is-as.cpp:7:
90+
../../../include/cpp2util.h:1641:9: error: invalid application of 'sizeof' to a function type
91+
sizeof(CPP2_TYPEOF(x)) > sizeof(C)
92+
^~~~~~~~~~~~~~~~~~~~~~
93+
../../../include/cpp2util.h:2124:12: note: in instantiation of function template specialization 'cpp2::as<int, double (double) noexcept>' requested here
94+
return as<C>(CPP2_FORWARD(x));
95+
^
96+
pure2-expected-is-as.cpp2:39:22: note: in instantiation of function template specialization 'cpp2::as_<int, double (&)(double) noexcept>' requested here
97+
auto val1 {cpp2::as_<int>(ex1)};
98+
^
99+
pure2-expected-is-as.cpp2:39:31: error: use of undeclared identifier 'ex1'
100+
auto val1 {cpp2::as_<int>(ex1)};
101+
^
102+
pure2-expected-is-as.cpp2:42:23: error: use of undeclared identifier 'ex2'
103+
if (cpp2::is<int>(ex2)) {
104+
^
105+
pure2-expected-is-as.cpp2:47:24: error: use of undeclared identifier 'ex2'
106+
if (cpp2::is<bool>(ex2)) {
107+
^
108+
pure2-expected-is-as.cpp2:52:18: error: use of undeclared identifier 'ex2'
109+
if (cpp2::is(ex2, 123)) {
110+
^
111+
fatal error: too many errors emitted, stopping now [-ferror-limit=]
112+
20 errors generated.

0 commit comments

Comments
 (0)