rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land.
> We don't properly handle lookup through using declarations when there is a > linkage spec in the common chain. Pedantic note: you mean using *directives*. At some point, we should probably reconsider whether `extern "C"` ought to be a `DeclContext` at all, as opposed to ultimately just setting a bit on the decls and providing some way of recovering the source structure. We don't make individual local scopes different DCs, and those probably have more right to be one than LSD. Anyway, this patch seems acceptable. ================ Comment at: clang/lib/AST/DeclBase.cpp:1215 for (; DC; DC = DC->getParent()) - if (DC->getPrimaryContext() == this) + if (DC->getDeclKind() != Decl::LinkageSpec && + DC->getPrimaryContext() == this) ---------------- `!isa<LinkageSpecDecl>(DC)`, please CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113709/new/ https://reviews.llvm.org/D113709 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits