Skip to content

Commit 2725e58

Browse files
committed
Housekeeping: Normalize test file names, build clean
Normalize test file naming to *-error.cpp2 Make GCC and Clang build clean
1 parent 4ffe564 commit 2725e58

6 files changed

Lines changed: 14 additions & 21 deletions

File tree

File renamed without changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pure2-deducing-pointers-error.cpp2...
2+
pure2-deducing-pointers-error.cpp2(14,8): error: = - pointer assignment from null or integer is illegal
3+
pure2-deducing-pointers-error.cpp2(17,9): error: = - pointer assignment from null or integer is illegal
4+
pure2-deducing-pointers-error.cpp2(20,9): error: = - pointer assignment from null or integer is illegal
5+
pure2-deducing-pointers-error.cpp2(21,9): error: += - pointer assignment from null or integer is illegal
6+
pure2-deducing-pointers-error.cpp2(25,9): error: = - pointer assignment from null or integer is illegal
7+
pure2-deducing-pointers-error.cpp2(29,9): error: = - pointer assignment from null or integer is illegal
8+
pure2-deducing-pointers-error.cpp2(31,11): error: ++ - pointer arithmetic is illegal - use std::span or gsl::span instead
9+
pure2-deducing-pointers-error.cpp2(33,8): error: = - pointer assignment from null or integer is illegal
10+
==> program violates lifetime safety guarantee - see previous errors
11+
==> program violates bounds safety guarantee - see previous errors
12+

‎regression-tests/test-results/pure2-deducing-pointers.cpp2.output‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎source/cppfront.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ class cppfront
16071607
}
16081608

16091609
// Don't work yet, TODO: finalize deducing pointer types from parameter lists
1610-
auto is_pointer_declaration(parameter_declaration_list_node const* decl_node, int deref_cnt, int addr_cnt) -> bool {
1610+
auto is_pointer_declaration(parameter_declaration_list_node const*, int, int) -> bool {
16111611
return false;
16121612
}
16131613

‎source/lex.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,6 @@ auto expand_string_literal(std::string_view text, std::vector<error>& errors, so
338338
auto paren_depth = 1;
339339
auto open = pos - 2;
340340

341-
// "next" in the string is the "last" one encountered in the backwards scan
342-
auto last_nonwhitespace = '\0';
343-
344341
for( ; text[open] != '"' || (open > current_start && text[open-1] != '\\'); --open)
345342
{
346343
if (text[open] == ')') {
@@ -352,10 +349,6 @@ auto expand_string_literal(std::string_view text, std::vector<error>& errors, so
352349
break;
353350
}
354351
}
355-
356-
if (!std::isspace(text[open])) {
357-
last_nonwhitespace = text[open];
358-
}
359352
}
360353
if (text[open] == '"')
361354
{

‎source/sema.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class sema
226226
{
227227
}
228228

229-
// Get the declaration of t within the same named function or beyound it
229+
// Get the declaration of t within the same named function or beyond it
230230
//
231231
auto get_declaration_of(token const& t, bool look_beyond_current_function = false) -> declaration_sym const*
232232
{

0 commit comments

Comments
 (0)