@@ -1402,6 +1402,7 @@ namespace {
1402
1402
printField (PD->getDefaultArgumentKind (), " default_arg" );
1403
1403
}
1404
1404
if (PD->hasDefaultExpr () &&
1405
+ PD->getDefaultArgumentCaptureInfo ().hasBeenComputed () &&
1405
1406
!PD->getDefaultArgumentCaptureInfo ().isTrivial ()) {
1406
1407
printFieldRaw ([&](raw_ostream &OS) {
1407
1408
PD->getDefaultArgumentCaptureInfo ().print (OS);
@@ -1488,7 +1489,8 @@ namespace {
1488
1489
1489
1490
void printCommonAFD (AbstractFunctionDecl *D, const char *Type, StringRef Label) {
1490
1491
printCommon (D, Type, Label, FuncColor);
1491
- if (!D->getCaptureInfo ().isTrivial ()) {
1492
+ if (D->getCaptureInfo ().hasBeenComputed () &&
1493
+ !D->getCaptureInfo ().isTrivial ()) {
1492
1494
printFlagRaw ([&](raw_ostream &OS) {
1493
1495
D->getCaptureInfo ().print (OS);
1494
1496
});
@@ -2826,7 +2828,8 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, StringRef>,
2826
2828
break ;
2827
2829
}
2828
2830
2829
- if (!E->getCaptureInfo ().isTrivial ()) {
2831
+ if (E->getCaptureInfo ().hasBeenComputed () &&
2832
+ !E->getCaptureInfo ().isTrivial ()) {
2830
2833
printFieldRaw ([&](raw_ostream &OS) {
2831
2834
E->getCaptureInfo ().print (OS);
2832
2835
}, " " , CapturesColor);
0 commit comments