Skip to content

Commit 2d87022

Browse files
committed
Do not unnecessarily shadow "tk"
We overwrite the token every time and don't actually read it afterwards, so we can safely use a single local variable.
1 parent 60dbdc3 commit 2d87022

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/cpp/parse.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4169,7 +4169,6 @@ bool Parser::rInitializeExpr(exprt &expr)
41694169
t==TOK_MSC_IF_NOT_EXISTS)
41704170
{
41714171
// TODO
4172-
cpp_tokent tk;
41734172
exprt name;
41744173
lex.get_token(tk);
41754174
if(lex.get_token(tk)!='(')
@@ -4467,7 +4466,6 @@ bool Parser::rClassSpec(typet &spec)
44674466

44684467
if(lex.LookAhead(0)==TOK_GCC_ATTRIBUTE)
44694468
{
4470-
cpp_tokent tk;
44714469
lex.get_token(tk);
44724470

44734471
if(!rAttribute(spec))

0 commit comments

Comments
 (0)