diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 18:03:49 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 18:03:49 +0000 |
commit | 9092c3e0fa01f3139b016d05d267a89e3b07747a (patch) | |
tree | 137ebebcae16fb0ce7ab4af456992bbd8d22fced /lib/AST/ParentMap.cpp | |
parent | 4981926bf654fe5a2c3893f24ca44106b217e71e (diff) | |
download | FreeBSD-src-9092c3e0fa01f3139b016d05d267a89e3b07747a.zip FreeBSD-src-9092c3e0fa01f3139b016d05d267a89e3b07747a.tar.gz |
Update clang to r84119.
Diffstat (limited to 'lib/AST/ParentMap.cpp')
-rw-r--r-- | lib/AST/ParentMap.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/AST/ParentMap.cpp b/lib/AST/ParentMap.cpp index 9d87daa..48251d5 100644 --- a/lib/AST/ParentMap.cpp +++ b/lib/AST/ParentMap.cpp @@ -32,7 +32,7 @@ ParentMap::ParentMap(Stmt* S) : Impl(0) { if (S) { MapTy *M = new MapTy(); BuildParentMap(*M, S); - Impl = M; + Impl = M; } } @@ -54,16 +54,16 @@ Stmt *ParentMap::getParentIgnoreParens(Stmt *S) const { bool ParentMap::isConsumedExpr(Expr* E) const { Stmt *P = getParent(E); Stmt *DirectChild = E; - + // Ignore parents that are parentheses or casts. while (P && (isa<ParenExpr>(P) || isa<CastExpr>(P))) { DirectChild = P; P = getParent(P); } - + if (!P) return false; - + switch (P->getStmtClass()) { default: return isa<Expr>(P); @@ -78,7 +78,7 @@ bool ParentMap::isConsumedExpr(Expr* E) const { case Stmt::ForStmtClass: return DirectChild == cast<ForStmt>(P)->getCond(); case Stmt::WhileStmtClass: - return DirectChild == cast<WhileStmt>(P)->getCond(); + return DirectChild == cast<WhileStmt>(P)->getCond(); case Stmt::DoStmtClass: return DirectChild == cast<DoStmt>(P)->getCond(); case Stmt::IfStmtClass: |