[clang] [NFC] Fix an inaccurate comment about typo-correction. (PR #108143)

Michael Park via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 20:53:21 PDT 2024


https://github.com/mpark created https://github.com/llvm/llvm-project/pull/108143

The comment describes "If the identifier was typo-corrected", but it doesn't need to have been typo-corrected, just being annotated is enough to retry.

>From a5cb61e79b928dae0272dc9b3c5448050361f775 Mon Sep 17 00:00:00 2001
From: Michael Park <mcypark at gmail.com>
Date: Fri, 6 Sep 2024 02:27:47 -0700
Subject: [PATCH] [NFC] Fix an inaccurate comment about typo-correction.

The comment describes "If the identifier was typo-corrected",
but it doesn't need to have been typo-corrected, just being
annotated is enough to retry.
---
 clang/lib/Parse/ParseStmt.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index bdb3fc051d0b35..9188799fce13e6 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -228,7 +228,7 @@ StmtResult Parser::ParseStatementOrDeclarationAfterAttributes(
         return StmtError();
       }
 
-      // If the identifier was typo-corrected, try again.
+      // If the identifier was annotated, try again.
       if (Tok.isNot(tok::identifier))
         goto Retry;
     }



More information about the cfe-commits mailing list