diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-05-01 00:48:43 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-05-01 00:48:43 +0000 |
commit | bd4fa45e7cf6a2f0adcb0ab66d5b3d338ec56c3c (patch) | |
tree | 2a2d614080a2280baab4fae1137427b6fb82af19 /lib/Sema/SemaLookup.cpp | |
parent | 8d59deec807ed53efcd07855199cdc9c979f447f (diff) |
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
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 9f5138ba4a..3a6e290326 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -1069,7 +1069,7 @@ static NamedDecl *getVisibleDecl(NamedDecl *D) { for (Decl::redecl_iterator RD = D->redecls_begin(), RDEnd = D->redecls_end(); RD != RDEnd; ++RD) { - if (NamedDecl *ND = dyn_cast<NamedDecl>(*RD)) { + if (NamedDecl *ND = dyn_cast<NamedDecl>(&*RD)) { if (LookupResult::isVisible(ND)) return ND; } |