summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/AST/ASTDumper.cpp2
-rw-r--r--clang/test/Misc/ast-dump-comment.cpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index eb5a7d3b05d..54efed289a6 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -2069,7 +2069,7 @@ void ASTDumper::visitParamCommandComment(const ParamCommandComment *C) {
OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
}
- if (C->isParamIndexValid())
+ if (C->isParamIndexValid() && !C->isVarArgParam())
OS << " ParamIndex=" << C->getParamIndex();
}
diff --git a/clang/test/Misc/ast-dump-comment.cpp b/clang/test/Misc/ast-dump-comment.cpp
index 4e84af01a51..5bd6934d80c 100644
--- a/clang/test/Misc/ast-dump-comment.cpp
+++ b/clang/test/Misc/ast-dump-comment.cpp
@@ -67,3 +67,11 @@ int Test_VerbatimBlockComment;
// CHECK: VarDecl{{.*}}Test_VerbatimBlockComment
// CHECK: VerbatimBlockComment{{.*}} Name="verbatim" CloseName="endverbatim"
// CHECK-NEXT: VerbatimBlockLineComment{{.*}} Text=" Aaa"
+
+/// \param ... More arguments
+template<typename T>
+void Test_TemplatedFunctionVariadic(int arg, ...);
+// CHECK: FunctionTemplateDecl{{.*}}Test_TemplatedFunctionVariadic
+// CHECK: ParamCommandComment{{.*}} [in] implicitly Param="..."
+// CHECK-NEXT: ParagraphComment
+// CHECK-NEXT: TextComment{{.*}} Text=" More arguments"
OpenPOWER on IntegriCloud