]> granicus.if.org Git - clang/commitdiff
We never want to pop the translation unit DC, so assert if this happens.
authorJohn McCall <rjmccall@apple.com>
Fri, 23 Jul 2010 22:45:07 +0000 (22:45 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 23 Jul 2010 22:45:07 +0000 (22:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109280 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index 85ea8bb23902b7cfb72e7269fa5a7e45509772c1..cf5f98e0685b4dddcfd0a7f8099aa61c32e54031 100644 (file)
@@ -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