//===-- DeclCXX.h - Classes for representing C++ declarations -*- C++ -*-=====////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file defines the C++ Decl subclasses.////===----------------------------------------------------------------------===//#ifndef LLVM_CLANG_AST_DECLCXX_H#define LLVM_CLANG_AST_DECLCXX_H#include"clang/AST/Decl.h"#include"llvm/ADT/SmallVector.h"namespaceclang{classClassTemplateDecl;classCXXRecordDecl;classCXXConstructorDecl;classCXXDestructorDecl;classCXXConversionDecl;classCXXMethodDecl;classClassTemplateSpecializationDecl;/// \brief Represents any kind of function declaration, whether it is a /// concrete function or a function template.classAnyFunctionDecl{NamedDecl*Function;AnyFunctionDecl(NamedDecl*ND):Function(ND){}public:AnyFunctionDecl(FunctionDecl*FD):Function(FD){}AnyFunctionDecl(FunctionTemplateDecl*FTD);/// \brief Implicily converts any function or function template into a /// named declaration.operatorNamedDecl*()const{returnFunction;}/// \brief Retrieve the underlying function or function template.NamedDecl*get()const{returnFunction;}staticAnyFunctionDeclgetFromNamedDecl(NamedDecl*ND){returnAnyFunctionDecl(ND);}};}// end namespace clangnamespacellvm{/// Implement simplify_type for AnyFunctionDecl, so that we can dyn_cast from /// AnyFunctionDecl to any function or function template declaration.template<>structsimplify_type<const::clang::AnyFunctionDecl>{typedef::clang::NamedDecl*SimpleType;staticSimpleTypegetSimplifiedValue(const::clang::AnyFunctionDecl&Val){returnVal;}};template<>structsimplify_type<::clang::AnyFunctionDecl>:publicsimplify_type<const::clang::AnyFunctionDecl>{};// Provide PointerLikeTypeTraits for non-cvr pointers.template<>classPointerLikeTypeTraits<::clang::AnyFunctionDecl>{public:staticinlinevoid*getAsVoidPointer(::clang::AnyFunctionDeclF){returnF.get();}staticinline::clang::AnyFunctionDeclgetFromVoidPointer(void*P){return::clang::AnyFunctionDecl::getFromNamedDecl(static_cast<::clang::NamedDecl*>(P));}enum{NumLowBitsAvailable=2};};}// end namespace llvmnamespaceclang{/// OverloadedFunctionDecl - An instance of this class represents a