]> granicus.if.org Git - clang/commit
Eliminate CXXConditionDeclExpr with extreme prejudice.
authorDouglas Gregor <dgregor@apple.com>
Wed, 25 Nov 2009 00:27:52 +0000 (00:27 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 25 Nov 2009 00:27:52 +0000 (00:27 +0000)
commit99e9b4d172f6877e6ba5ebe75bb8238721f5e01c
tree16c143b06b39022258614b713ed5999a7d7679c0
parentd1a7846699a82f85ff3ce6b2e383409537c3f5c5
Eliminate CXXConditionDeclExpr with extreme prejudice.

All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).

Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting

Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
27 files changed:
include/clang/AST/Expr.h
include/clang/AST/ExprCXX.h
include/clang/AST/Stmt.h
include/clang/AST/StmtNodes.def
include/clang/Frontend/StmtXML.def
include/clang/Parse/Action.h
include/clang/Parse/Parser.h
lib/AST/Expr.cpp
lib/AST/ExprCXX.cpp
lib/AST/StmtPrinter.cpp
lib/AST/StmtProfile.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGStmt.cpp
lib/CodeGen/CodeGenFunction.h
lib/Frontend/PCHReaderStmt.cpp
lib/Frontend/PCHWriterStmt.cpp
lib/Frontend/PrintParserCallbacks.cpp
lib/Frontend/StmtXML.cpp
lib/Parse/ParseExprCXX.cpp
lib/Parse/ParseStmt.cpp
lib/Sema/Sema.h
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaStmt.cpp
lib/Sema/TreeTransform.h
test/CodeGenCXX/condition.cpp
test/SemaCXX/condition.cpp