]> granicus.if.org Git - clang/commitdiff
Add an assert for safety check.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 21 Jul 2009 06:48:06 +0000 (06:48 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 21 Jul 2009 06:48:06 +0000 (06:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76539 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Parse/Parser.h

index 50145ae5300b1e018bcce90dc066b1e44acd238a..18f61e793c23dc21a0d848735a00b1096ae2193b 100644 (file)
@@ -1086,6 +1086,7 @@ private:
       : P(p), SS(ss), EnteredScope(false) {}
 
     void EnterDeclaratorScope() {
+      assert(!EnteredScope && "Already entered the scope!");
       assert(SS.isSet() && "C++ scope was not set!");
       P.Actions.ActOnCXXEnterDeclaratorScope(P.CurScope, SS);
       EnteredScope = true;