forked from OSchip/llvm-project
Allow parameter attributes on varargs function parameters.
llvm-svn: 45850
This commit is contained in:
parent
193daf0698
commit
4cc275c3fb
|
@ -390,10 +390,9 @@ void Verifier::VerifyParamAttrs(const FunctionType *FT,
|
|||
if (!Attrs)
|
||||
return;
|
||||
|
||||
// Note that when calling a varargs function, the following test disallows
|
||||
// parameter attributes for the arguments corresponding to the varargs part.
|
||||
Assert1(Attrs->size() &&
|
||||
Attrs->getParamIndex(Attrs->size()-1) <= FT->getNumParams(),
|
||||
Assert1(FT->isVarArg() ||
|
||||
(Attrs->size() &&
|
||||
Attrs->getParamIndex(Attrs->size()-1) <= FT->getNumParams()),
|
||||
"Attributes after end of type!", V);
|
||||
|
||||
bool SawNest = false;
|
||||
|
|
Loading…
Reference in New Issue