[clang] 0e9843b - [clang][parse][NFC] Fix grammar in a comment
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 9 23:39:44 PDT 2023
Author: Timm Bäder
Date: 2023-06-10T07:51:36+02:00
New Revision: 0e9843bf35d94100a843baf660700011227a6cc4
URL: https://github.com/llvm/llvm-project/commit/0e9843bf35d94100a843baf660700011227a6cc4
DIFF: https://github.com/llvm/llvm-project/commit/0e9843bf35d94100a843baf660700011227a6cc4.diff
LOG: [clang][parse][NFC] Fix grammar in a comment
Added:
Modified:
clang/lib/Parse/ParseStmt.cpp
Removed:
################################################################################
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index 224df67b47f8f..43ff808e296b5 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -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) ||
@@ -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);
};
More information about the cfe-commits
mailing list