r189494 - PR16995: Failing to associate static members with their enclosing class
Eric Christopher
echristo at gmail.com
Wed Aug 28 12:56:08 PDT 2013
> for(DeclContext::decl_iterator I = RD->decls_begin(),
> E = RD->decls_end(); I != E; ++I) {
> - Decl *D = *I;
> - if (D->isImplicit())
> - continue;
> -
> - if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(D)) {
> + if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(*I)) {
> // Reuse the existing member function declaration if it exists
> llvm::DenseMap<const FunctionDecl *, llvm::WeakVH>::iterator MI =
> SPCache.find(Method->getCanonicalDecl());
> - if (MI == SPCache.end())
> - EltTys.push_back(CreateCXXMemberFunction(Method, Unit, RecordTy));
> - else
> + if (MI == SPCache.end()) {
> + if (!Method->isImplicit())
> + EltTys.push_back(CreateCXXMemberFunction(Method, Unit, RecordTy));
> + } else
>
How did moving the check for implicit into the not-found-in-cache
branch do anything?
-eric
More information about the cfe-commits
mailing list