diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2014-03-19 13:59:36 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2014-03-19 13:59:36 +0000 |
commit | 2fea8f7f7c5e519c65194544adde16a0d83433a6 (patch) | |
tree | 163cd9d9674b2b0d20de4643a4748225e119e883 /lib/AST/CommentSema.cpp | |
parent | ffd5d167a05c459bcb41d5f5090723bedcfd2eca (diff) | |
download | clang-2fea8f7f7c5e519c65194544adde16a0d83433a6.tar.gz |
Comment parsing: recognize \param ... on function templates with variadic
parameters
Patch by Joe Ranieri.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentSema.cpp')
-rw-r--r-- | lib/AST/CommentSema.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/AST/CommentSema.cpp b/lib/AST/CommentSema.cpp index 0ae00820fd..e51f8781c1 100644 --- a/lib/AST/CommentSema.cpp +++ b/lib/AST/CommentSema.cpp @@ -792,11 +792,14 @@ bool Sema::isAnyFunctionDecl() { } bool Sema::isFunctionOrMethodVariadic() { - if (!isAnyFunctionDecl() && !isObjCMethodDecl()) + if (!isAnyFunctionDecl() && !isObjCMethodDecl() && !isFunctionTemplateDecl()) return false; if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ThisDeclInfo->CurrentDecl)) return FD->isVariadic(); + if (const FunctionTemplateDecl *FTD = + dyn_cast<FunctionTemplateDecl>(ThisDeclInfo->CurrentDecl)) + return FTD->getTemplatedDecl()->isVariadic(); if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(ThisDeclInfo->CurrentDecl)) return MD->isVariadic(); |