[PATCH] D129953: [PATCH] [clang-tidy] NFC: add preposition "of" to code annotation of ElseAfterReturnCheck

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 17 00:10:59 PDT 2022


njames93 added a comment.

In D129953#3657925 <https://reviews.llvm.org/D129953#3657925>, @zhouyizhou wrote:

> In D129953#3657920 <https://reviews.llvm.org/D129953#3657920>, @njames93 wrote:
>
>> While you're here could you also put full stops( or periods 🙃) at the end of the sentences.
>
> Thank Nathan for reviewing my patch
> I am here, and am very happy to make further enhancement ;-) But because my native language is not English, I don't know where should I put the full stops at . 
> Isn't  "If the if statement is the last statement of its enclosing statements scope, we can pull the decl out of the if statement." constitute a complete sentence?
>
> Thanks again
> Zhouyi

They are just used to end sentences, we typically try to put them at the end of every comment in LLVM.



================
Comment at: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp:266
     if (IsLastInScope) {
-      // If the if statement is the last statement its enclosing statements
+      // If the if statement is the last statement of its enclosing statements
       // scope, we can pull the decl out of the if statement.
----------------



================
Comment at: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp:302
     if (IsLastInScope) {
-      // If the if statement is the last statement its enclosing statements
+      // If the if statement is the last statement of its enclosing statements
       // scope, we can pull the decl out of the if statement.
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129953/new/

https://reviews.llvm.org/D129953



More information about the cfe-commits mailing list