forked from OSchip/llvm-project
Comment parsing: fix a crash when dumping comment ast for a function template
with variadic parameters Patch by Joe Ranieri. llvm-svn: 204236
This commit is contained in:
parent
d9eb05aca3
commit
dbff5c71fa
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue