[PATCH] D28514: [CodeCompletion] Reset the hidden declaration obtained after lookup when caching UsingShadowDecls
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 18 08:25:26 PST 2017
arphaman added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:961
+ // then incorrectly applied to the target declaration. This can be avoided
+ // by resetting the declaration that's being hidden.
+ if (Hiding && isa<UsingDecl>(Hiding))
> I'm not sure about this, but is it correct for VisibleDeclsRecord::checkHidden to return the UsingDecl when the UsingShadowDecl is being passed? I'm thinking perhaps the bug is in that function, since it seems like it should just return a nullptr instead if UsingDecl doesn't hide UsingShadowDecl, .
That makes sense I think, I've updated the code to fix `VisibleDeclsRecord::checkHidden` instead.
More information about the cfe-commits