From dd762d1e5b1fc35df53ccfb201bc1a244044fd64 Mon Sep 17 00:00:00 2001 From: John McCall Date: Fri, 23 Jul 2010 22:45:07 +0000 Subject: [PATCH] We never want to pop the translation unit DC, so assert if this happens. llvm-svn: 109280 --- clang/lib/Sema/SemaDecl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 85ea8bb23902..cf5f98e0685b 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -360,6 +360,7 @@ void Sema::PopDeclContext() { assert(CurContext && "DeclContext imbalance!"); CurContext = getContainingDC(CurContext); + assert(CurContext && "Popped translation unit!"); } /// EnterDeclaratorContext - Used when we must lookup names in the context