Skip to content

Commit

Permalink
Remove some comments inside expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Feb 3, 2014
1 parent 8dc7d88 commit 388d342
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/cast.c
Expand Up @@ -2863,7 +2863,7 @@ IntRange getIntRange(Expression *e)
v |= v >> 8;
v |= v >> 16;
v |= v >> 32;
return v /* | 0xff*/;
return v;
}

// The algorithms for &, |, ^ are not yet the best! Sometimes they will produce
Expand Down
2 changes: 1 addition & 1 deletion src/expression.c
Expand Up @@ -13451,7 +13451,7 @@ Expression *EqualExp::semantic(Scope *sc)
VarExp *ve1 = (VarExp *)ae1->e1;
VarExp *ve2 = (VarExp *)ae2->e1;

if (ve1->var == ve2->var /*|| ve1->var->toSymbol() == ve2->var->toSymbol()*/)
if (ve1->var == ve2->var)
{
// They are the same, result is 'true' for ==, 'false' for !=
e = new IntegerExp(loc, (op == TOKequal), Type::tboolean);
Expand Down
4 changes: 2 additions & 2 deletions src/mtype.c
Expand Up @@ -1997,7 +1997,7 @@ Type *Type::unqualify(unsigned m)
Type *t = mutableOf()->unSharedOf();

Type *tn = nextOf();
if (tn && tn->ty != Tfunction/*!(ty == Tpointer && tn->ty == Tfunction)*/)
if (tn && tn->ty != Tfunction)
{
Type *utn = tn->unqualify(m);
if (utn != tn)
Expand Down Expand Up @@ -4760,7 +4760,7 @@ Type *TypeAArray::syntaxCopy()

d_uns64 TypeAArray::size(Loc loc)
{
return Target::ptrsize /* * 2*/;
return Target::ptrsize;
}


Expand Down
13 changes: 6 additions & 7 deletions src/parse.c
Expand Up @@ -2041,7 +2041,7 @@ TemplateParameters *Parser::parseTemplateParameterList(int flag)
else
def = parseCondExp();
}
tp = new TemplateAliasParameter(loc/*todo*/, tp_ident, spectype, spec, def);
tp = new TemplateAliasParameter(loc, tp_ident, spectype, spec, def);
}
else if (t->value == TOKcolon || t->value == TOKassign ||
t->value == TOKcomma || t->value == TOKrparen)
Expand Down Expand Up @@ -2123,7 +2123,7 @@ TemplateParameters *Parser::parseTemplateParameterList(int flag)
nextToken();
tp_defaultvalue = parseDefaultInitExp();
}
tp = new TemplateValueParameter(loc/*todo*/, tp_ident, tp_valtype, tp_specvalue, tp_defaultvalue);
tp = new TemplateValueParameter(loc, tp_ident, tp_valtype, tp_specvalue, tp_defaultvalue);
}
tpl->push(tp);
if (token.value != TOKcomma)
Expand Down Expand Up @@ -2794,8 +2794,7 @@ Type *Parser::parseDeclarator(Type *t, Identifier **pident, TemplateParameters *

case TOKlparen:
if (peekNext() == TOKmul || // like: T (*fp)();
peekNext() == TOKlparen // like: T ((*fp))();
/* || peekNext() == TOKlbracket*/) // like: T ([] a)
peekNext() == TOKlparen) // like: T ((*fp))();
{
/* Parse things with parentheses around the identifier, like:
* int (*ident[3])[]
Expand Down Expand Up @@ -3029,7 +3028,7 @@ Dsymbols *Parser::parseDeclarations(StorageClass storage_class, const utf8_t *co
Dsymbols *a2 = new Dsymbols();
a2->push(s);
TemplateDeclaration *tempdecl =
new TemplateDeclaration(loc, ident, tpl, NULL/*constraint*/, a2);
new TemplateDeclaration(loc, ident, tpl, NULL, a2);
s = tempdecl;
}
a->push(s);
Expand Down Expand Up @@ -3408,7 +3407,7 @@ Dsymbols *Parser::parseDeclarations(StorageClass storage_class, const utf8_t *co
Dsymbols *a2 = new Dsymbols();
a2->push(s);
TemplateDeclaration *tempdecl =
new TemplateDeclaration(loc, ident, tpl, NULL/*constraint*/, a2, 0);
new TemplateDeclaration(loc, ident, tpl, NULL, a2, 0);
s = tempdecl;
}

Expand Down Expand Up @@ -3482,7 +3481,7 @@ Dsymbols *Parser::parseAutoDeclarations(StorageClass storageClass, const utf8_t
Dsymbols *a2 = new Dsymbols();
a2->push(v);
TemplateDeclaration *tempdecl =
new TemplateDeclaration(loc, ident, tpl, NULL/*constraint*/, a2, 0);
new TemplateDeclaration(loc, ident, tpl, NULL, a2, 0);
s = tempdecl;
}

Expand Down
2 changes: 1 addition & 1 deletion src/statement.c
Expand Up @@ -4569,7 +4569,7 @@ Statement *TryCatchStatement::syntaxCopy()

Statement *TryCatchStatement::semantic(Scope *sc)
{
body = body->semanticScope(sc, NULL /*this*/, NULL);
body = body->semanticScope(sc, NULL, NULL);
assert(body);

/* Even if body is empty, still do semantic analysis on catches
Expand Down

0 comments on commit 388d342

Please sign in to comment.