[cfe-dev] why does ForStmt have a CondVar field?
Eli Friedman
eli.friedman at gmail.com
Wed Dec 23 17:21:08 PST 2009
On Wed, Dec 23, 2009 at 5:08 PM, Ted Kremenek <kremenek at apple.com> wrote:
> I noticed that ForStmt has a CondVar field, similar to the condition variable field for IfStmt and WhileStmt. Unlike these other Stms, however, ForStmt uses a DeclStmt for the initialization expression. From what I can tell, the CondVar field in ForStmt is always NULL.
>
> Is it needed? It also doesn't make semantic sense, since there is no notion of one condition variable, as one can declare multiple variables in the initialization of the ForStmt.
void a() { for (int x = 0;int y = x;x++) {} }
-Eli
More information about the cfe-dev
mailing list