ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since 42dcae7 was
51b7345,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
544 bytes
|
Line | |
---|
1 | /* |
---|
2 | * This file is part of the Cforall project |
---|
3 | * |
---|
4 | * $Id: parseutility.cc,v 1.2 2005/08/29 20:14:15 rcbilson Exp $ |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "parseutility.h" |
---|
9 | #include "SynTree/Type.h" |
---|
10 | #include "SynTree/Expression.h" |
---|
11 | |
---|
12 | |
---|
13 | Expression * |
---|
14 | notZeroExpr( Expression *orig ) |
---|
15 | { |
---|
16 | UntypedExpr *comparison = new UntypedExpr( new NameExpr( "?!=?" ) ); |
---|
17 | comparison->get_args().push_back( orig ); |
---|
18 | comparison->get_args().push_back( new NameExpr( "0" ) ); |
---|
19 | return new CastExpr( comparison, new BasicType( Type::Qualifiers(), BasicType::SignedInt ) ); |
---|
20 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.