Skip to content

Commit 05c0095

Browse files
committed
Remove assert because it was violated in downstream code
1 parent b41afe1 commit 05c0095

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/lib/Parse/ParseDecl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3308,14 +3308,14 @@ void Parser::ParseAlignmentSpecifier(ParsedAttributes &Attrs,
33083308

33093309
void Parser::DistributeCLateParsedAttrs(Decl *Dcl,
33103310
LateParsedAttrList *LateAttrs) {
3311-
assert(Dcl && "Dcl cannot be null");
3312-
33133311
if (!LateAttrs)
33143312
return;
33153313

3316-
for (auto *LateAttr : *LateAttrs) {
3317-
if (LateAttr->Decls.empty())
3318-
LateAttr->addDecl(Dcl);
3314+
if (Dcl) {
3315+
for (auto *LateAttr : *LateAttrs) {
3316+
if (LateAttr->Decls.empty())
3317+
LateAttr->addDecl(Dcl);
3318+
}
33193319
}
33203320
}
33213321

0 commit comments

Comments
 (0)