summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/IdentifierResolver.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-05-01 00:48:43 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-05-01 00:48:43 +0000
commitb15de1eaedfc0344161f00f270c2d495a01459a1 (patch)
tree1c34db3a8ab474dd61e5b20c1375a46edbe8dc01 /clang/lib/Sema/IdentifierResolver.cpp
parentd7bca7629c94c923fe394fad7de303339bc5bced (diff)
downloadbcm5719-llvm-b15de1eaedfc0344161f00f270c2d495a01459a1.tar.gz
bcm5719-llvm-b15de1eaedfc0344161f00f270c2d495a01459a1.zip
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. llvm-svn: 155869
Diffstat (limited to 'clang/lib/Sema/IdentifierResolver.cpp')
-rw-r--r--clang/lib/Sema/IdentifierResolver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/IdentifierResolver.cpp b/clang/lib/Sema/IdentifierResolver.cpp
index 4d62cab1676..4c6898cb7a5 100644
--- a/clang/lib/Sema/IdentifierResolver.cpp
+++ b/clang/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())
OpenPOWER on IntegriCloud