diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-12-08 18:40:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-12-08 18:40:42 +0000 |
commit | f57172b24f08a68d179675989813d5479dc87829 (patch) | |
tree | 47d214eda99288951195881d3e20e38dbfed2208 /include/clang/AST/DeclBase.h | |
parent | 4ebd716f260584663297bdb820714788f2a1e4cb (diff) |
Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60708 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/DeclBase.h')
-rw-r--r-- | include/clang/AST/DeclBase.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 6d61da4698..55919da54e 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -211,6 +211,10 @@ public: static bool CollectingStats(bool Enable = false); static void PrintStats(); + /// isTemplateParameter - Determines whether this declartion is a + /// template parameter. + bool isTemplateParameter() const; + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *) { return true; } static DeclContext *castToDeclContext(const Decl *); @@ -388,6 +392,11 @@ template<> struct DeclContext::KindTrait<DeclContext> { static Decl::Kind getKind(const DeclContext *D) { return D->DeclKind; } }; +inline bool Decl::isTemplateParameter() const { + return getKind() == TemplateTypeParm || getKind() == NonTypeTemplateParm; +} + + } // end clang. namespace llvm { |