Skip to content

Commit 4e37486

Browse files
committed
Update regression tests for latest PR merge, and add a Clang 12-vs-13+ compat note
1 parent ce5bd83 commit 4e37486

11 files changed

+28
-7
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
// Clang note: When using Clang as the Cpp1 compiler, the following uses of an unnamed function
2+
// require Clang 13 or higher; Clang 12 complains "lambda expression in an unevaluated operand"
3+
// Standalone Cpp1 repro: https://godbolt.org/z/dznnYTvc6
4+
15
v: <T> concept = :() -> bool = true;();
26

37
u: type == std::type_identity_t<decltype(:() = {})>;
48

59
t: @struct type = {
6-
this: std::type_identity_t<decltype(:() = {})>;
10+
this: std::type_identity_t<decltype(:() = {})>;
711
}
812

913
main: () = { }
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pure2-bugfix-for-non-local-function-expression.cpp2:5:34: error: lambda expression in an unevaluated operand
2+
template<typename T> concept v = []() -> bool { return true; }();
3+
^
4+
pure2-bugfix-for-non-local-function-expression.cpp2:7:41: error: lambda expression in an unevaluated operand
5+
using u = std::type_identity_t<decltype([]() -> void{})>;
6+
^
7+
pure2-bugfix-for-non-local-function-expression.cpp2:9:47: error: lambda expression in an unevaluated operand
8+
class t: public std::type_identity_t<decltype([]() -> void{})> {
9+
^
10+
3 errors generated.

regression-tests/test-results/gcc-10/pure2-bugfix-for-non-local-function-expression.cpp.execution

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pure2-bugfix-for-non-local-function-expression.cpp2:9:7: warning: ‘t’ has a base ‘t::<lambda()>’ whose type has no linkage [-Wsubobject-linkage]

regression-tests/test-results/gcc-13/pure2-bugfix-for-non-local-function-expression.cpp.execution

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pure2-bugfix-for-non-local-function-expression.cpp2:9:7: warning: ‘t’ has a base ‘t::<lambda()>’ which has no linkage [-Wsubobject-linkage]

regression-tests/test-results/msvc-2022/pure2-bugfix-for-non-local-function-expression.cpp.execution

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pure2-bugfix-for-non-local-function-expression.cpp

regression-tests/test-results/pure2-bugfix-for-non-local-function-expression.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@
77
#include "cpp2util.h"
88

99

10-
#line 5 "pure2-bugfix-for-non-local-function-expression.cpp2"
10+
#line 9 "pure2-bugfix-for-non-local-function-expression.cpp2"
1111
class t;
12-
12+
1313

1414
//=== Cpp2 type definitions and function declarations ===========================
1515

16-
#line 1 "pure2-bugfix-for-non-local-function-expression.cpp2"
16+
// Clang note: When using Clang as the Cpp1 compiler, the following uses of an unnamed function
17+
// require Clang 13 or higher; Clang 12 complains "lambda expression in an unevaluated operand"
18+
// Standalone Cpp1 repro: https://godbolt.org/z/dznnYTvc6
19+
20+
#line 5 "pure2-bugfix-for-non-local-function-expression.cpp2"
1721
template<typename T> concept v = []() -> bool { return true; }();
1822

1923
using u = std::type_identity_t<decltype([]() -> void{})>;
@@ -28,6 +32,6 @@ auto main() -> int;
2832
//=== Cpp2 function definitions =================================================
2933

3034

31-
#line 9 "pure2-bugfix-for-non-local-function-expression.cpp2"
35+
#line 13 "pure2-bugfix-for-non-local-function-expression.cpp2"
3236
auto main() -> int{}
3337

regression-tests/test-results/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
cppfront compiler v0.2.1 Build 8901:1640
2+
cppfront compiler v0.2.1 Build 8901:1703
33
Copyright(c) Herb Sutter All rights reserved
44

55
SPDX-License-Identifier: CC-BY-NC-ND-4.0

source/build.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"8901:1640"
1+
"8901:1703"

0 commit comments

Comments
 (0)