Skip to content
Merged
Prev Previous commit
The RecordDecl may be null so skip if it is.
  • Loading branch information
bwendling committed Jan 10, 2024
commit adb51b3c3c441490b7892ed83c8c98fd1eedb996
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/CGBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type,
// }
//
// Instead of calculating a wrong number, we give up.
if (CountCountedByAttrs(OuterRD) > 1)
if (OuterRD && CountCountedByAttrs(OuterRD) > 1)
return nullptr;
}

Expand Down