diff options
-rw-r--r-- | lib/Analysis/UninitializedValues.cpp | 6 | ||||
-rw-r--r-- | lib/Sema/TreeTransform.h | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/Analysis/UninitializedValues.cpp b/lib/Analysis/UninitializedValues.cpp index 59a42813fc..a1a49b6757 100644 --- a/lib/Analysis/UninitializedValues.cpp +++ b/lib/Analysis/UninitializedValues.cpp @@ -394,13 +394,7 @@ public: void BlockStmt_VisitObjCForCollectionStmt(ObjCForCollectionStmt *fs); bool isTrackedVar(const VarDecl *vd) { -#if 1 - // FIXME: This is a temporary workaround to deal with the fact - // that DeclContext's do not always contain all of their variables! - return vals.hasEntry(vd); -#else return ::isTrackedVar(vd, cast<DeclContext>(ac.getDecl())); -#endif } FindVarResult findBlockVarDecl(Expr *ex); diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index a639f5f303..b6d38f618b 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -1203,8 +1203,11 @@ public: SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id) { - return getSema().BuildExceptionDeclaration(0, Declarator, - StartLoc, IdLoc, Id); + VarDecl *Var = getSema().BuildExceptionDeclaration(0, Declarator, + StartLoc, IdLoc, Id); + if (Var) + getSema().CurContext->addDecl(Var); + return Var; } /// \brief Build a new C++ catch statement. |