Skip to content

Commit

Permalink
[clang][parse][NFC] Fix grammar in a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Jun 10, 2023
1 parent 24f49de commit 0e9843b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Parse/ParseStmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ StmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) {
IfScope.Exit();

// If the then or else stmt is invalid and the other is valid (and present),
// make turn the invalid one into a null stmt to avoid dropping the other
// turn the invalid one into a null stmt to avoid dropping the other
// part. If both are invalid, return error.
if ((ThenStmt.isInvalid() && ElseStmt.isInvalid()) ||
(ThenStmt.isInvalid() && ElseStmt.get() == nullptr) ||
Expand All @@ -1636,7 +1636,7 @@ StmtResult Parser::ParseIfStatement(SourceLocation *TrailingElseLoc) {

if (IsConsteval) {
auto IsCompoundStatement = [](const Stmt *S) {
if (const auto *Outer = dyn_cast_or_null<AttributedStmt>(S))
if (const auto *Outer = dyn_cast_if_present<AttributedStmt>(S))
S = Outer->getSubStmt();
return isa_and_nonnull<clang::CompoundStmt>(S);
};
Expand Down

0 comments on commit 0e9843b

Please sign in to comment.