diff options
Diffstat (limited to 'contrib/llvm-project/clang/include/clang/AST/Decl.h')
-rw-r--r-- | contrib/llvm-project/clang/include/clang/AST/Decl.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/contrib/llvm-project/clang/include/clang/AST/Decl.h b/contrib/llvm-project/clang/include/clang/AST/Decl.h index eb5313575d6e..94df0fc152f5 100644 --- a/contrib/llvm-project/clang/include/clang/AST/Decl.h +++ b/contrib/llvm-project/clang/include/clang/AST/Decl.h @@ -1887,7 +1887,10 @@ public: TK_FunctionTemplateSpecialization, // A function template specialization that hasn't yet been resolved to a // particular specialized function template. - TK_DependentFunctionTemplateSpecialization + TK_DependentFunctionTemplateSpecialization, + // A non-template function which is in a dependent scope. + TK_DependentNonTemplate + }; /// Stashed information about a defaulted function definition whose body has @@ -1936,20 +1939,21 @@ private: /// The template or declaration that this declaration /// describes or was instantiated from, respectively. /// - /// For non-templates, this value will be NULL. For function - /// declarations that describe a function template, this will be a - /// pointer to a FunctionTemplateDecl. For member functions - /// of class template specializations, this will be a MemberSpecializationInfo + /// For non-templates this value will be NULL, unless this declaration was + /// declared directly inside of a function template, in which case it will + /// have a pointer to a FunctionDecl, stored in the NamedDecl. For function + /// declarations that describe a function template, this will be a pointer to + /// a FunctionTemplateDecl, stored in the NamedDecl. For member functions of + /// class template specializations, this will be a MemberSpecializationInfo /// pointer containing information about the specialization. /// For function template specializations, this will be a /// FunctionTemplateSpecializationInfo, which contains information about /// the template being specialized and the template arguments involved in /// that specialization. - llvm::PointerUnion<FunctionTemplateDecl *, - MemberSpecializationInfo *, + llvm::PointerUnion<NamedDecl *, MemberSpecializationInfo *, FunctionTemplateSpecializationInfo *, DependentFunctionTemplateSpecializationInfo *> - TemplateOrSpecialization; + TemplateOrSpecialization; /// Provides source/type location info for the declaration name embedded in /// the DeclaratorDecl base class. @@ -2692,6 +2696,13 @@ public: setInstantiationOfMemberFunction(getASTContext(), FD, TSK); } + /// Specify that this function declaration was instantiated from a + /// FunctionDecl FD. This is only used if this is a function declaration + /// declared locally inside of a function template. + void setInstantiatedFromDecl(FunctionDecl *FD); + + FunctionDecl *getInstantiatedFromDecl() const; + /// Retrieves the function template that is described by this /// function declaration. /// |