From: Dmitri Gribenko Date: Thu, 29 Aug 2019 12:17:21 +0000 (+0000) Subject: Removed `AnyFunctionDecl`, it is unused. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=577735f23f3a39be6396b75f741a1dfe4ad1c2af;p=clang Removed `AnyFunctionDecl`, it is unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370341 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index f0acfc4d59..f9668f1dce 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -73,52 +73,6 @@ class TemplateDecl; class TemplateParameterList; class UsingDecl; -/// Represents any kind of function declaration, whether it is a -/// concrete function or a function template. -class AnyFunctionDecl { - NamedDecl *Function; - - AnyFunctionDecl(NamedDecl *ND) : Function(ND) {} - -public: - AnyFunctionDecl(FunctionDecl *FD) : Function(FD) {} - AnyFunctionDecl(FunctionTemplateDecl *FTD); - - /// Implicily converts any function or function template into a - /// named declaration. - operator NamedDecl *() const { return Function; } - - /// Retrieve the underlying function or function template. - NamedDecl *get() const { return Function; } - - static AnyFunctionDecl getFromNamedDecl(NamedDecl *ND) { - return AnyFunctionDecl(ND); - } -}; - -} // namespace clang - -namespace llvm { - - // Provide PointerLikeTypeTraits for non-cvr pointers. - template<> - struct PointerLikeTypeTraits< ::clang::AnyFunctionDecl> { - static void *getAsVoidPointer(::clang::AnyFunctionDecl F) { - return F.get(); - } - - static ::clang::AnyFunctionDecl getFromVoidPointer(void *P) { - return ::clang::AnyFunctionDecl::getFromNamedDecl( - static_cast< ::clang::NamedDecl*>(P)); - } - - enum { NumLowBitsAvailable = 2 }; - }; - -} // namespace llvm - -namespace clang { - /// Represents an access specifier followed by colon ':'. /// /// An objects of this class represents sugar for the syntactic occurrence diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h index 235b31c1c3..cb04e78b3d 100644 --- a/include/clang/AST/DeclTemplate.h +++ b/include/clang/AST/DeclTemplate.h @@ -2527,10 +2527,6 @@ public: } }; -/// Implementation of inline functions that require the template declarations -inline AnyFunctionDecl::AnyFunctionDecl(FunctionTemplateDecl *FTD) - : Function(FTD) {} - /// Represents a variable template specialization, which refers to /// a variable template with a given set of template arguments. ///