summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReaderStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-23 23:44:04 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-23 23:44:04 +0000
commit633caca35396864f9de09b3dae6e165d917ce698 (patch)
tree2a5540826621e653e8bc0e50db0bccc8b9d7ec9c /clang/lib/Frontend/PCHReaderStmt.cpp
parent8a9fa3af6911f61fe71df752aaba6d6f292563ae (diff)
downloadbcm5719-llvm-633caca35396864f9de09b3dae6e165d917ce698.tar.gz
bcm5719-llvm-633caca35396864f9de09b3dae6e165d917ce698.zip
Explicitly track the condition variable within an "if" statement,
rather than burying it in a CXXConditionDeclExpr (that occassionally hides behind implicit conversions). Similar changes for switch, while, and do-while will follow, then the removal of CXXConditionDeclExpr. This commit is the canary. llvm-svn: 89717
Diffstat (limited to 'clang/lib/Frontend/PCHReaderStmt.cpp')
-rw-r--r--clang/lib/Frontend/PCHReaderStmt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHReaderStmt.cpp b/clang/lib/Frontend/PCHReaderStmt.cpp
index 01af67dd50a..fb95584b2a8 100644
--- a/clang/lib/Frontend/PCHReaderStmt.cpp
+++ b/clang/lib/Frontend/PCHReaderStmt.cpp
@@ -177,6 +177,7 @@ unsigned PCHStmtReader::VisitLabelStmt(LabelStmt *S) {
unsigned PCHStmtReader::VisitIfStmt(IfStmt *S) {
VisitStmt(S);
+ S->setConditionVariable(cast_or_null<VarDecl>(Reader.GetDecl(Record[Idx++])));
S->setCond(cast<Expr>(StmtStack[StmtStack.size() - 3]));
S->setThen(StmtStack[StmtStack.size() - 2]);
S->setElse(StmtStack[StmtStack.size() - 1]);
OpenPOWER on IntegriCloud