Skip to content

Commit ed1d90c

Browse files
authored
[clang][NFC] simplify the unset check in ParseLabeledStatement (#117430)
`!isInvalid && !isUsable -> !isInvalid && !(!isInvalid && !isUnset) -> isUnset` It is more simple to understand.
1 parent c894d3a commit ed1d90c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Parse/ParseStmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ StmtResult Parser::ParseLabeledStatement(ParsedAttributes &Attrs,
799799
}
800800

801801
// If we've not parsed a statement yet, parse one now.
802-
if (!SubStmt.isInvalid() && !SubStmt.isUsable())
802+
if (SubStmt.isUnset())
803803
SubStmt = ParseStatement(nullptr, StmtCtx);
804804

805805
// Broken substmt shouldn't prevent the label from being added to the AST.

0 commit comments

Comments
 (0)