From bd4fa45e7cf6a2f0adcb0ab66d5b3d338ec56c3c Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 1 May 2012 00:48:43 +0000 Subject: Remove ref/value inconsistency in redecl_iterator. Similar to r155808 - this mistake has been made in a few iterators. Based on Chandler Carruth's feedback to r155808 I added an implicit conversion to Decl* to ease adoption/usage. Useful for the pointer comparison, but not the dyn_cast (due to template argument deduction causing the conversion not to be used) - there for future convenience, though. This idiom (op T* for iterators) seems to be fairly idiomatic within the LLVM codebase & I'll likely add it as I fix up the other iterators here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155869 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/IdentifierResolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Sema/IdentifierResolver.cpp') diff --git a/lib/Sema/IdentifierResolver.cpp b/lib/Sema/IdentifierResolver.cpp index 4d62cab167..4c6898cb7a 100644 --- a/lib/Sema/IdentifierResolver.cpp +++ b/lib/Sema/IdentifierResolver.cpp @@ -304,7 +304,7 @@ static DeclMatchKind compareDeclarations(NamedDecl *Existing, NamedDecl *New) { for (Decl::redecl_iterator RD = New->redecls_begin(), RDEnd = New->redecls_end(); RD != RDEnd; ++RD) { - if (*RD == Existing) + if (RD == Existing) return DMK_Replace; if (RD->isCanonicalDecl()) -- cgit v1.2.1