Skip to content

Commit 177006a

Browse files
committed
Update name of declared_that_funcs
Also commit some unfinished `enum` work...
1 parent 52a2798 commit 177006a

File tree

11 files changed

+325
-137
lines changed

11 files changed

+325
-137
lines changed

regression-tests/test-results/clang-12/run-tests-clang-12.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ done
2222
rm -f *.obj *.exp *.lib
2323
printf "\nDone: %s .cpp tests compiled\n" "$count"
2424
printf "\n %s .cpp executables generated and run\n" "$exe_count"
25-
echo "$(date +"%T")"

regression-tests/test-results/gcc-13/run-tests-gcc-13.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ done
2222
rm -f *.obj *.exp *.lib
2323
printf "\nDone: %s .cpp tests compiled\n" "$count"
2424
printf "\n %s .cpp executables generated and run\n" "$exe_count"
25-
echo "$(date +"%T")"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32534 for x86
1+
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32537 for x86
22
Copyright (C) Microsoft Corporation. All rights reserved.
33

regression-tests/test-results/msvc-2022/run-tests-msvc-2022.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ echo.
2424
echo Done: %count% .cpp tests compiled
2525
echo.
2626
echo. %exe_count% executables generated and run
27-
echo %TIME%

regression-tests/test-results/run-tests.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ echo. %total_count% total
2929
if %total_count% NEQ %count% (
3030
echo. *** MISMATCH: should equal total tests run
3131
)
32-
echo %TIME%

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 8618:1139
2+
cppfront compiler v0.2.1 Build 8723:1124
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-
"8618:1139"
1+
"8723:1124"

source/cppfront.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,17 +1024,17 @@ class cppfront
10241024
// their .epilog, by reference for performance while still having lifetime safety
10251025
struct function_info
10261026
{
1027-
declaration_node const* decl = {};
1028-
declaration_node::declared_that_funcs declared_that_functions = {};
1029-
function_prolog prolog = {};
1030-
std::vector<std::string> epilog = {};
1027+
declaration_node const* decl = {};
1028+
declaration_node::declared_value_set_funcs declared_value_set_functions = {};
1029+
function_prolog prolog = {};
1030+
std::vector<std::string> epilog = {};
10311031

10321032
function_info(
10331033
declaration_node const* decl_,
1034-
declaration_node::declared_that_funcs declared_that_functions_
1034+
declaration_node::declared_value_set_funcs declared_value_set_functions_
10351035
)
10361036
: decl{decl_}
1037-
, declared_that_functions{declared_that_functions_}
1037+
, declared_value_set_functions{declared_value_set_functions_}
10381038
{ }
10391039
};
10401040
class current_functions_
@@ -1043,7 +1043,7 @@ class cppfront
10431043
public:
10441044
auto push(
10451045
declaration_node const* decl,
1046-
declaration_node::declared_that_funcs thats
1046+
declaration_node::declared_value_set_funcs thats
10471047
) {
10481048
list.emplace_back(decl, thats);
10491049
}
@@ -5294,7 +5294,7 @@ class cppfront
52945294

52955295
current_functions.push(
52965296
&n,
5297-
n.find_parent_declared_that_functions()
5297+
n.find_parent_declared_value_set_functions()
52985298
);
52995299
auto guard = finally([&]{ current_functions.pop(); });
53005300

@@ -5443,8 +5443,8 @@ class cppfront
54435443
// A1) This is '(out this, that)'
54445444
// and no '(inout this, that)' was written by the user
54455445
(
5446-
&n == current_functions.back().declared_that_functions.out_this_in_that
5447-
&& !current_functions.back().declared_that_functions.inout_this_in_that
5446+
&n == current_functions.back().declared_value_set_functions.out_this_in_that
5447+
&& !current_functions.back().declared_value_set_functions.inout_this_in_that
54485448
)
54495449
||
54505450
// A2) This is '(out this, move that)'
@@ -5459,16 +5459,16 @@ class cppfront
54595459
// assignment than like move construction, because assignments are designed
54605460
// structurally to set the value of an existing 'this' object)
54615461
(
5462-
&n == current_functions.back().declared_that_functions.out_this_move_that
5463-
&& !current_functions.back().declared_that_functions.inout_this_move_that
5464-
&& !current_functions.back().declared_that_functions.inout_this_in_that
5462+
&n == current_functions.back().declared_value_set_functions.out_this_move_that
5463+
&& !current_functions.back().declared_value_set_functions.inout_this_move_that
5464+
&& !current_functions.back().declared_value_set_functions.inout_this_in_that
54655465
)
54665466
||
54675467
// A3) This is '(out this, something-other-than-that)'
54685468
(
54695469
n.is_constructor()
54705470
&& !n.is_constructor_with_that()
5471-
&& !contains( current_functions.back().declared_that_functions.assignments_from, n.nth_parameter_type_name(2) )
5471+
&& !contains( current_functions.back().declared_value_set_functions.assignments_from, n.nth_parameter_type_name(2) )
54725472
)
54735473
)
54745474
{
@@ -5483,15 +5483,15 @@ class cppfront
54835483
// M1) This is '(out this, that)'
54845484
// and no '(out this, move that)' was written by the user
54855485
(
5486-
&n == current_functions.back().declared_that_functions.out_this_in_that
5487-
&& !current_functions.back().declared_that_functions.out_this_move_that
5486+
&n == current_functions.back().declared_value_set_functions.out_this_in_that
5487+
&& !current_functions.back().declared_value_set_functions.out_this_move_that
54885488
)
54895489
||
54905490
// M2) This is '(inout this, that)'
54915491
// and no '(inout this, move that)' was written by the user
54925492
(
5493-
&n == current_functions.back().declared_that_functions.inout_this_in_that
5494-
&& !current_functions.back().declared_that_functions.inout_this_move_that
5493+
&n == current_functions.back().declared_value_set_functions.inout_this_in_that
5494+
&& !current_functions.back().declared_value_set_functions.inout_this_move_that
54955495
)
54965496
)
54975497
{

source/parse.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,16 +2875,16 @@ struct declaration_node
28752875
return false;
28762876
}
28772877

2878-
struct declared_that_funcs {
2878+
struct declared_value_set_funcs {
28792879
declaration_node const* out_this_in_that = {};
28802880
declaration_node const* out_this_move_that = {};
28812881
declaration_node const* inout_this_in_that = {};
28822882
declaration_node const* inout_this_move_that = {};
28832883
std::vector<std::string> assignments_from = {};
28842884
};
28852885

2886-
auto find_declared_that_functions() const
2887-
-> declared_that_funcs
2886+
auto find_declared_value_set_functions() const
2887+
-> declared_value_set_funcs
28882888
{
28892889
if (!initializer) {
28902890
return {};
@@ -2893,7 +2893,7 @@ struct declaration_node
28932893
auto compound_stmt = initializer->get_if<compound_statement_node>();
28942894
assert (compound_stmt);
28952895

2896-
auto ret = declared_that_funcs{};
2896+
auto ret = declared_value_set_funcs{};
28972897
for (auto& o : compound_stmt->statements)
28982898
{
28992899
auto decl = o->get_if<declaration_node>();
@@ -2920,11 +2920,11 @@ struct declaration_node
29202920
return ret;
29212921
}
29222922

2923-
auto find_parent_declared_that_functions() const
2924-
-> declared_that_funcs
2923+
auto find_parent_declared_value_set_functions() const
2924+
-> declared_value_set_funcs
29252925
{
29262926
if (parent_is_type()) {
2927-
return parent_declaration->find_declared_that_functions();
2927+
return parent_declaration->find_declared_value_set_functions();
29282928
}
29292929
// else
29302930
return {};

0 commit comments

Comments
 (0)