//===- ParentMapContext.h - Map of parents using DynTypedNode ---*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // Similar to ParentMap.h, but generalizes to non-Stmt nodes, which can have // multiple parents. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_AST_PARENTMAPCONTEXT_H #define LLVM_CLANG_AST_PARENTMAPCONTEXT_H #include "clang/AST/ASTContext.h" #include "clang/AST/ASTTypeTraits.h" namespace clang { class DynTypedNodeList; class ParentMapContext { … }; class TraversalKindScope { … }; /// Container for either a single DynTypedNode or for an ArrayRef to /// DynTypedNode. For use with ParentMap. class DynTypedNodeList { … }; template <typename NodeT> inline DynTypedNodeList ParentMapContext::getParents(const NodeT &Node) { … } template <typename NodeT> inline DynTypedNodeList ASTContext::getParents(const NodeT &Node) { … } template <> inline DynTypedNodeList ASTContext::getParents(const DynTypedNode &Node) { … } } // namespace clang #endif