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)
llvm-svn: 76539

clang/include/clang/Parse/Parser.h

index 50145ae..18f61e7 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;