Skip to content

Commit e1fe746

Browse files
authored
Merge pull request #4580 from diffblue/clang-8-fixes
clang 8 fixes
2 parents 9557087 + 3e19c91 commit e1fe746

File tree

9 files changed

+436
-434
lines changed

9 files changed

+436
-434
lines changed

src/ansi-c/parser.y

Lines changed: 339 additions & 339 deletions
Large diffs are not rendered by default.

src/ansi-c/parser_static.inc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
#define YYSTYPE unsigned
1010
#define YYSTYPE_IS_TRIVIAL 1
1111

12-
#define mto(x, y) stack(x).add_to_operands(std::move(stack(y)))
12+
#define mto(x, y) parser_stack(x).add_to_operands(std::move(parser_stack(y)))
1313
#define mts(x, y) (to_type_with_subtypes(stack_type(x)).move_to_subtypes(stack_type(y)))
1414
#define binary(x, y, l, id, z) { init(x, id); \
15-
stack(x).add_source_location()=stack(l).source_location(); \
16-
stack(x).add_to_operands(std::move(stack(y)), std::move(stack(z))); }
15+
parser_stack(x).add_source_location()=parser_stack(l).source_location(); \
16+
parser_stack(x).add_to_operands(std::move(parser_stack(y)), std::move(parser_stack(z))); }
1717

1818
/*******************************************************************\
1919
@@ -47,7 +47,7 @@ Function: init
4747
inline static void init(YYSTYPE &expr, const irep_idt &id)
4848
{
4949
newstack(expr);
50-
stack(expr).id(id);
50+
parser_stack(expr).id(id);
5151
}
5252

5353
/*******************************************************************\
@@ -64,7 +64,7 @@ Function: set
6464

6565
inline static void set(YYSTYPE expr, const irep_idt &id)
6666
{
67-
stack(expr).id(id);
67+
parser_stack(expr).id(id);
6868
}
6969

7070
/*******************************************************************\
@@ -82,7 +82,7 @@ Function: statement
8282
static void statement(YYSTYPE &expr, const irep_idt &id)
8383
{
8484
set(expr, ID_code);
85-
stack(expr).set(ID_statement, id);
85+
parser_stack(expr).set(ID_statement, id);
8686
}
8787

8888
/*******************************************************************\
@@ -140,7 +140,7 @@ Function: merge_types
140140
#if 0
141141
static void merge_types(const YYSTYPE dest, const YYSTYPE src)
142142
{
143-
merge_types(stack(dest), stack(src));
143+
merge_types(parser_stack(dest), parser_stack(src));
144144
}
145145
#endif
146146

@@ -158,7 +158,7 @@ Function: merge
158158

159159
static YYSTYPE merge(const YYSTYPE src1, const YYSTYPE src2)
160160
{
161-
merge_types(stack(src1), stack(src2));
161+
merge_types(parser_stack(src1), parser_stack(src2));
162162
return src1;
163163
}
164164

@@ -329,7 +329,7 @@ Function: create_function_scope
329329

330330
static void create_function_scope(const YYSTYPE d)
331331
{
332-
ansi_c_declarationt &declaration=to_ansi_c_declaration(stack(d));
332+
ansi_c_declarationt &declaration=to_ansi_c_declaration(parser_stack(d));
333333
ansi_c_declaratort &declarator=declaration.declarator();
334334

335335
irep_idt function_name=declarator.get_base_name();

src/ansi-c/scanner.l

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ extern int yyansi_cdebug;
5050
#endif
5151

5252
#define loc() \
53-
{ newstack(yyansi_clval); PARSER.set_source_location(stack(yyansi_clval)); }
53+
{ newstack(yyansi_clval); PARSER.set_source_location(parser_stack(yyansi_clval)); }
5454

5555
int make_identifier()
5656
{
@@ -84,8 +84,8 @@ int make_identifier()
8484

8585
if(PARSER.cpp98)
8686
{
87-
stack(yyansi_clval).id(ID_symbol);
88-
stack(yyansi_clval).set(ID_C_base_name, final_base_name);
87+
parser_stack(yyansi_clval).id(ID_symbol);
88+
parser_stack(yyansi_clval).set(ID_C_base_name, final_base_name);
8989
return TOK_IDENTIFIER;
9090
}
9191
else
@@ -100,18 +100,18 @@ int make_identifier()
100100

101101
PARSER.tag_following=false;
102102

103-
stack(yyansi_clval).set(ID_C_base_name, base_name);
104-
stack(yyansi_clval).set(ID_identifier, identifier);
105-
stack(yyansi_clval).set(ID_C_id_class, static_cast<int>(result));
103+
parser_stack(yyansi_clval).set(ID_C_base_name, base_name);
104+
parser_stack(yyansi_clval).set(ID_identifier, identifier);
105+
parser_stack(yyansi_clval).set(ID_C_id_class, static_cast<int>(result));
106106

107107
if(result==ansi_c_id_classt::ANSI_C_TYPEDEF)
108108
{
109-
stack(yyansi_clval).id(ID_typedef_type);
109+
parser_stack(yyansi_clval).id(ID_typedef_type);
110110
return TOK_TYPEDEFNAME;
111111
}
112112
else
113113
{
114-
stack(yyansi_clval).id(ID_symbol);
114+
parser_stack(yyansi_clval).id(ID_symbol);
115115
return TOK_IDENTIFIER;
116116
}
117117
}
@@ -298,8 +298,8 @@ void ansi_c_scanner_init()
298298

299299
<GRAMMAR>{char_lit} {
300300
newstack(yyansi_clval);
301-
stack(yyansi_clval)=convert_character_literal(yytext, true);
302-
PARSER.set_source_location(stack(yyansi_clval));
301+
parser_stack(yyansi_clval)=convert_character_literal(yytext, true);
302+
PARSER.set_source_location(parser_stack(yyansi_clval));
303303
return TOK_CHARACTER;
304304
}
305305

@@ -325,9 +325,9 @@ void ansi_c_scanner_init()
325325
<STRING_LITERAL>"/*" { yy_push_state(STRING_LITERAL_COMMENT); /* C comment, ignore */ }
326326
<STRING_LITERAL>"//".*\n { /* C++ comment, ignore */ }
327327
<STRING_LITERAL>. { // anything else: back to normal
328-
source_locationt l=stack(yyansi_clval).source_location();
329-
stack(yyansi_clval)=convert_string_literal(PARSER.string_literal);
330-
stack(yyansi_clval).add_source_location().swap(l);
328+
source_locationt l=parser_stack(yyansi_clval).source_location();
329+
parser_stack(yyansi_clval)=convert_string_literal(PARSER.string_literal);
330+
parser_stack(yyansi_clval).add_source_location().swap(l);
331331
yy_pop_state(); // back to normal
332332
yyless(0); // put back
333333
return TOK_STRING;
@@ -1483,8 +1483,8 @@ __decltype { if(PARSER.cpp98 &&
14831483
{identifier} { return make_identifier(); }
14841484

14851485
{integer_s} { newstack(yyansi_clval);
1486-
stack(yyansi_clval)=convert_integer_literal(yytext);
1487-
PARSER.set_source_location(stack(yyansi_clval));
1486+
parser_stack(yyansi_clval)=convert_integer_literal(yytext);
1487+
PARSER.set_source_location(parser_stack(yyansi_clval));
14881488
return TOK_INTEGER;
14891489
}
14901490

@@ -1494,14 +1494,14 @@ __decltype { if(PARSER.cpp98 &&
14941494
return TOK_SCANNER_ERROR;
14951495
}
14961496
newstack(yyansi_clval);
1497-
stack(yyansi_clval)=convert_float_literal(yytext);
1498-
PARSER.set_source_location(stack(yyansi_clval));
1497+
parser_stack(yyansi_clval)=convert_float_literal(yytext);
1498+
PARSER.set_source_location(parser_stack(yyansi_clval));
14991499
return TOK_FLOATING;
15001500
}
15011501

15021502
{float_s} { newstack(yyansi_clval);
1503-
stack(yyansi_clval)=convert_float_literal(yytext);
1504-
PARSER.set_source_location(stack(yyansi_clval));
1503+
parser_stack(yyansi_clval)=convert_float_literal(yytext);
1504+
PARSER.set_source_location(parser_stack(yyansi_clval));
15051505
return TOK_FLOATING;
15061506
}
15071507

@@ -1536,9 +1536,9 @@ __decltype { if(PARSER.cpp98 &&
15361536
return '{';
15371537
}
15381538
<MSC_ASM>[^{^}^\n]* { loc();
1539-
source_locationt l=stack(yyansi_clval).source_location();
1540-
stack(yyansi_clval)=string_constantt(yytext);
1541-
stack(yyansi_clval).add_source_location()=l;
1539+
source_locationt l=parser_stack(yyansi_clval).source_location();
1540+
parser_stack(yyansi_clval)=string_constantt(yytext);
1541+
parser_stack(yyansi_clval).add_source_location()=l;
15421542
BEGIN(GRAMMAR);
15431543
return TOK_ASM_STRING;
15441544
}
@@ -1551,7 +1551,7 @@ __decltype { if(PARSER.cpp98 &&
15511551
. { // anything else: back to normal
15521552
PARSER.asm_block_following=false;
15531553
loc();
1554-
stack(yyansi_clval)=string_constantt(PARSER.string_literal);
1554+
parser_stack(yyansi_clval)=string_constantt(PARSER.string_literal);
15551555
BEGIN(GRAMMAR);
15561556
yyless(0); // put back
15571557
return TOK_ASM_STRING;
@@ -1687,8 +1687,8 @@ __decltype { if(PARSER.cpp98 &&
16871687
}
16881688
}
16891689
{integer_s} { newstack(yyansi_clval);
1690-
stack(yyansi_clval)=convert_integer_literal(yytext);
1691-
PARSER.set_source_location(stack(yyansi_clval));
1690+
parser_stack(yyansi_clval)=convert_integer_literal(yytext);
1691+
PARSER.set_source_location(parser_stack(yyansi_clval));
16921692
return TOK_INTEGER;
16931693
}
16941694
{ws} { /* ignore */ }

src/goto-symex/goto_state.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class goto_statet
6262
unsigned atomic_section_id = 0;
6363

6464
/// Constructors
65-
goto_statet() = default;
66-
goto_statet &operator=(const goto_statet &other) = default;
65+
goto_statet() = delete;
66+
goto_statet &operator=(const goto_statet &other) = delete;
6767
goto_statet &operator=(goto_statet &&other) = default;
6868
goto_statet(const goto_statet &other) = default;
6969
goto_statet(goto_statet &&other) = default;

0 commit comments

Comments
 (0)