summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CommentSema.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2014-03-19 13:59:36 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2014-03-19 13:59:36 +0000
commitd9eb05aca3996b2e93b36c3f0bf84a6852c302b9 (patch)
tree80307fb0cca5b532e49142c868770fd8497f9de3 /clang/lib/AST/CommentSema.cpp
parent17703c1092421dfec763658c153b10c23b454425 (diff)
downloadbcm5719-llvm-d9eb05aca3996b2e93b36c3f0bf84a6852c302b9.tar.gz
bcm5719-llvm-d9eb05aca3996b2e93b36c3f0bf84a6852c302b9.zip
Comment parsing: recognize \param ... on function templates with variadic
parameters Patch by Joe Ranieri. llvm-svn: 204235
Diffstat (limited to 'clang/lib/AST/CommentSema.cpp')
-rw-r--r--clang/lib/AST/CommentSema.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/AST/CommentSema.cpp b/clang/lib/AST/CommentSema.cpp
index 0ae00820fde..e51f8781c1b 100644
--- a/clang/lib/AST/CommentSema.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud