From dbe13110f59f48b4dbb7552b3ac2935acdeece7f Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 14 Apr 2012 14:01:31 +0000 Subject: Vendor import of clang trunk r154661: http://llvm.org/svn/llvm-project/cfe/trunk@r154661 --- lib/AST/ParentMap.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/AST/ParentMap.cpp') diff --git a/lib/AST/ParentMap.cpp b/lib/AST/ParentMap.cpp index 5eef83a81a8b..64016d9cdd6d 100644 --- a/lib/AST/ParentMap.cpp +++ b/lib/AST/ParentMap.cpp @@ -26,6 +26,10 @@ static void BuildParentMap(MapTy& M, Stmt* S) { M[*I] = S; BuildParentMap(M, *I); } + + // Also include the source expr tree of an OpaqueValueExpr in the map. + if (const OpaqueValueExpr *OVE = dyn_cast(S)) + BuildParentMap(M, OVE->getSourceExpr()); } ParentMap::ParentMap(Stmt* S) : Impl(0) { -- cgit v1.3