forked from OSchip/llvm-project
parent
f26609686f
commit
73cc507602
|
@ -149,15 +149,7 @@ bool Sema::SemaBuiltinVAStart(CallExpr *TheCall) {
|
|||
// Verify that the second argument to the builtin is the last argument of the
|
||||
// current function or method.
|
||||
bool SecondArgIsLastNamedArgument = false;
|
||||
const Expr *Arg = TheCall->getArg(1);
|
||||
while (1) {
|
||||
if (const ParenExpr *PE = dyn_cast<ParenExpr>(Arg))
|
||||
Arg = PE->getSubExpr();
|
||||
else if (const ImplicitCastExpr *CE = dyn_cast<ImplicitCastExpr>(Arg))
|
||||
Arg = CE->getSubExpr();
|
||||
else
|
||||
break;
|
||||
}
|
||||
const Expr *Arg = TheCall->getArg(1)->IgnoreParenCasts();
|
||||
|
||||
if (const DeclRefExpr *DR = dyn_cast<DeclRefExpr>(Arg)) {
|
||||
if (const ParmVarDecl *PV = dyn_cast<ParmVarDecl>(DR->getDecl())) {
|
||||
|
|
Loading…
Reference in New Issue