[cfe-commits] r76511 - /cfe/trunk/include/clang/AST/DeclBase.h
Argiris Kirtzidis
akyrtzi at gmail.com
Mon Jul 20 17:06:28 PDT 2009
Author: akirtzidis
Date: Mon Jul 20 19:06:27 2009
New Revision: 76511
URL: http://llvm.org/viewvc/llvm-project?rev=76511&view=rev
Log:
Add an assertion for the return value of Decl::getNextRedeclaration().
Modified:
cfe/trunk/include/clang/AST/DeclBase.h
Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=76511&r1=76510&r2=76511&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Mon Jul 20 19:06:27 2009
@@ -352,6 +352,7 @@
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;
}
More information about the cfe-commits
mailing list