diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-06-27 10:45:02 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-27 10:45:02 +0000 |
| commit | 4ebdf5c4f587daef4e0be499802eac3a7a49bf2f (patch) | |
| tree | 2c5a83521a20c02e7805581a174008aa9bc23579 /lib/AST/DeclBase.cpp | |
| parent | f698f7e71940663e26a4806a96fb0bdfa160c886 (diff) | |
Notes
Diffstat (limited to 'lib/AST/DeclBase.cpp')
| -rw-r--r-- | lib/AST/DeclBase.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 02e71d7a8681..5815d820aef6 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -96,6 +96,13 @@ bool Decl::isTemplateParameterPack() const { return false; } +bool Decl::isFunctionOrFunctionTemplate() const { + if (const UsingDecl *UD = dyn_cast<UsingDecl>(this)) + return UD->getTargetDecl()->isFunctionOrFunctionTemplate(); + + return isa<FunctionDecl>(this) || isa<FunctionTemplateDecl>(this); +} + //===----------------------------------------------------------------------===// // PrettyStackTraceDecl Implementation //===----------------------------------------------------------------------===// |
