]> granicus.if.org Git - clang/commitdiff
Add an assertion for the return value of Decl::getNextRedeclaration().
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 21 Jul 2009 00:06:27 +0000 (00:06 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 21 Jul 2009 00:06:27 +0000 (00:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76511 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclBase.h

index dc34c4203456daf44c4e829600a0e96d576b724a..c488d1c7a0a86b7dccc1fa1da4c5f9ef4ddf1e88 100644 (file)
@@ -352,6 +352,7 @@ public:
       assert(Current && "Advancing while iterator has reached end");
       // Get either previous decl or latest decl.
       Decl *Next = Current->getNextRedeclaration();
+      assert(Next && "Should return next redeclaration or itself, never null!");
       Current = (Next != Starter ? Next : 0);
       return *this;
     }