diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2011-10-20 21:14:49 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2011-10-20 21:14:49 +0000 |
| commit | 36981b17ed939300f6f8fc2355a255f711fcef71 (patch) | |
| tree | ee2483e98b09cac943dc93a6969d83ca737ff139 /lib/AST/ParentMap.cpp | |
| parent | 180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (diff) | |
Notes
Diffstat (limited to 'lib/AST/ParentMap.cpp')
| -rw-r--r-- | lib/AST/ParentMap.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/AST/ParentMap.cpp b/lib/AST/ParentMap.cpp index b7b2005e9f84..5eef83a81a8b 100644 --- a/lib/AST/ParentMap.cpp +++ b/lib/AST/ParentMap.cpp @@ -66,6 +66,14 @@ Stmt *ParentMap::getParentIgnoreParenCasts(Stmt *S) const { return S; } +Stmt *ParentMap::getParentIgnoreParenImpCasts(Stmt *S) const { + do { + S = getParent(S); + } while (S && isa<Expr>(S) && cast<Expr>(S)->IgnoreParenImpCasts() != S); + + return S; +} + Stmt *ParentMap::getOuterParenParent(Stmt *S) const { Stmt *Paren = 0; while (isa<ParenExpr>(S)) { |
