Index: include/clang/AST/ParentMap.h
===================================================================
--- include/clang/AST/ParentMap.h	(revision 119144)
+++ include/clang/AST/ParentMap.h	(working copy)
@@ -24,6 +24,11 @@
   ParentMap(Stmt* ASTRoot);
   ~ParentMap();
 
+  /// \brief Adds and/or updates the parent/child-relations of the complete 
+  /// stmt tree of S. All children of S including indirect descendants are 
+  /// visited and updated or inserted but not the parents of S. 
+  void addStmt(Stmt* S);     
+
   Stmt *getParent(Stmt*) const;
   Stmt *getParentIgnoreParens(Stmt *) const;
 
Index: lib/AST/ParentMap.cpp
===================================================================
--- lib/AST/ParentMap.cpp	(revision 119143)
+++ lib/AST/ParentMap.cpp	(working copy)
@@ -40,6 +40,12 @@
   delete (MapTy*) Impl;
 }
 
+void ParentMap::addStmt(Stmt* S) {
+  if (S) {
+    BuildParentMap(*(MapTy*) Impl, S);
+  }
+}
+
 Stmt* ParentMap::getParent(Stmt* S) const {
   MapTy* M = (MapTy*) Impl;
   MapTy::iterator I = M->find(S);
