Skip to content

Commit 821a5a0

Browse files
committed
fixup! fix NumArgs check
1 parent 4ad1c79 commit 821a5a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/Expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3184,7 +3184,7 @@ Expr *Expr::IgnoreUnlessSpelledInSource() {
31843184
// 1 argument (i.e., the structure being decomposed). If it has
31853185
// more than 1 argument, the others need to be defaulted.
31863186
unsigned NumArgs = C->getNumArgs();
3187-
if (NumArgs > 1 && !isa<CXXDefaultArgExpr>(C->getArg(1)))
3187+
if (NumArgs == 0 || (NumArgs > 1 && !isa<CXXDefaultArgExpr>(C->getArg(1))))
31883188
return E;
31893189

31903190
Expr *A = C->getArg(0);

0 commit comments

Comments
 (0)