rsmith added inline comments.
================ Comment at: include/clang/AST/DeclBase.h:2055-2075 +template<> +struct GraphTraits<const ::clang::DeclContext *> { + using NodeRef = const ::clang::Decl *; + using ChildIteratorType = ::clang::DeclContext::decl_iterator; + + static NodeRef getEntryNode(const ::clang::DeclContext *DC) { + return cast<::clang::Decl>(DC); ---------------- Neat :) ================ Comment at: lib/Sema/SemaDecl.cpp:16354 + if (auto *DC = dyn_cast<DeclContext>(*It)) + VisitChildren = DC->isLookupContext(); + ---------------- This will prematurely stop traversal if we reach a `LinkageSpecDecl`. I think we should instead stop if we reach a declaration for which `!DC->getRedeclContext()->isFileContext()` (that is, we should check namespace-scope declarations only). https://reviews.llvm.org/D41566 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits