diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-23 23:44:04 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-23 23:44:04 +0000 |
commit | 8cfe5a784133d90bf329fd20801824a6f71bb8ca (patch) | |
tree | 074054ca6c3e71e178729248da6006d569804241 /lib/Frontend/PCHReaderStmt.cpp | |
parent | 21affc089773edc30be43ecb0022a48acdac7093 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReaderStmt.cpp')
-rw-r--r-- | lib/Frontend/PCHReaderStmt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp index 01af67dd50..fb95584b2a 100644 --- a/lib/Frontend/PCHReaderStmt.cpp +++ b/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]); |