Skip to content

Commit aee65d7

Browse files
committed
Compile warning-clean again
1 parent 82e8707 commit aee65d7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

source/cppfront.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ class cppfront
871871
class current_functions_
872872
{
873873
std::vector<function_info> list = { {} };
874-
const int MaxNestedFunctions = 100; // see the next comment and the assertion:
874+
const size_t MaxNestedFunctions = 100; // see the next comment and the assertion:
875875
public:
876876
current_functions_() {
877877
list.reserve(MaxNestedFunctions); // (1) for pointer stability / lifetime safety

source/lex.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ auto lex_line(
12241224
//G decimal-literal ''' digit [uU][lL][lL]
12251225
//G
12261226
//G floating-point-literal:
1227-
//G digit { ' | digit }* (. digit { ' | digit }*)? ([eE][-+]?digit { ' | digit }*) [fFlL]
1227+
//G digit { ' | digit }* . digit ({ ' | digit }*)? ([eE][-+]?digit { ' | digit }*) [fFlL]
12281228
//G
12291229
//G TODO full grammar & refactor to utility functions with their
12301230
//G own unit test rather than inline everything here
@@ -1247,7 +1247,7 @@ auto lex_line(
12471247
// and be error checked. Best would be to slurp all
12481248
// [a-zA-Z] and then validate against a list of
12491249
// allowed suffixes. Ideally handle the C++23 size
1250-
// suffixes aswell.
1250+
// suffixes as well.
12511251
if (peek(j) == 'u' || peek(j) == 'U') { ++j; }
12521252
if (peek(j) == 'l' || peek(j) == 'L') { ++j; }
12531253
if (peek(j) == 'l' || peek(j) == 'L') { ++j; }

source/parse.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ auto is_assignment_operator(lexeme l)
102102
//
103103

104104
//-----------------------------------------------------------------------
105-
// try_emit
105+
// try_visit
106106
//
107107
// Helper to visit whatever is in a variant where each
108108
// alternative is a smart pointer
@@ -4667,12 +4667,12 @@ class parser
46674667

46684668
// So we can create the typeid_id_node and its unqualified_id_node
46694669

4670-
auto id = std::make_unique<unqualified_id_node>();
4671-
id->identifier = &generated_tokens_->back();
4670+
auto gen_id = std::make_unique<unqualified_id_node>();
4671+
gen_id->identifier = &generated_tokens_->back();
46724672

46734673
auto type = std::make_unique<type_id_node>();
46744674
type->pos = start;
4675-
type->id = std::move(id);
4675+
type->id = std::move(gen_id);
46764676

46774677
n->type = std::move(type);
46784678
assert (n->is_object());

0 commit comments

Comments
 (0)