We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ad1c79 commit 821a5a0Copy full SHA for 821a5a0
clang/lib/AST/Expr.cpp
@@ -3184,7 +3184,7 @@ Expr *Expr::IgnoreUnlessSpelledInSource() {
3184
// 1 argument (i.e., the structure being decomposed). If it has
3185
// more than 1 argument, the others need to be defaulted.
3186
unsigned NumArgs = C->getNumArgs();
3187
- if (NumArgs > 1 && !isa<CXXDefaultArgExpr>(C->getArg(1)))
+ if (NumArgs == 0 || (NumArgs > 1 && !isa<CXXDefaultArgExpr>(C->getArg(1))))
3188
return E;
3189
3190
Expr *A = C->getArg(0);
0 commit comments