diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-18 23:54:50 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-18 23:54:50 +0000 |
commit | 07c5908fa10c84144907bc699751dc16d4dcb1f8 (patch) | |
tree | e3c531d1265194d7b1a7e1170b00950a088a6971 /tools | |
parent | 2aa5cf412c9a56aba1e3a7b04ca18499a2b83b20 (diff) |
[libclang] Modify clang_getCursorType to be able to handle a function template decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libclang/CXType.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/libclang/CXType.cpp b/tools/libclang/CXType.cpp index 945eb11427..6f87fc51a4 100644 --- a/tools/libclang/CXType.cpp +++ b/tools/libclang/CXType.cpp @@ -155,6 +155,8 @@ CXType clang_getCursorType(CXCursor C) { return MakeCXType(PD->getType(), TU); if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) return MakeCXType(FD->getType(), TU); + if (const FunctionTemplateDecl *FTD = dyn_cast<FunctionTemplateDecl>(D)) + return MakeCXType(FTD->getTemplatedDecl()->getType(), TU); return MakeCXType(QualType(), TU); } |