[PATCH] D115115: [doc] Fix namespace comment style in Coding Guidelines

Carlos Galvez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 7 05:37:09 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGd40130199f76: [doc] Fix namespace comment style in Coding Guidelines (authored by carlosgalvezp).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115115

Files:
  llvm/docs/CodingStandards.rst


Index: llvm/docs/CodingStandards.rst
===================================================================
--- llvm/docs/CodingStandards.rst
+++ llvm/docs/CodingStandards.rst
@@ -844,7 +844,7 @@
   namespace llvm {
   int foo(char *s) { // Mismatch between "const char *" and "char *"
   }
-  } // end namespace llvm
+  } // namespace llvm
 
 This error will not be caught until the build is nearly complete, when the
 linker fails to find a definition for any uses of the original function.  If the
@@ -1508,8 +1508,8 @@
 
   };
 
-  } // end namespace knowledge
-  } // end namespace llvm
+  } // namespace knowledge
+  } // namespace llvm
 
 
 Feel free to skip the closing comment when the namespace being closed is
@@ -1550,7 +1550,7 @@
     StringSort(...)
     bool operator<(const char *RHS) const;
   };
-  } // end anonymous namespace
+  } // namespace
 
   static void runHelper() {
     ...
@@ -1574,7 +1574,7 @@
 
   // ... many declarations ...
 
-  } // end anonymous namespace
+  } // namespace
 
 When you are looking at "``runHelper``" in the middle of a large C++ file,
 you have no immediate way to tell if this function is local to the file.  In


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115115.392370.patch
Type: text/x-patch
Size: 1165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211207/9c729736/attachment.bin>


More information about the llvm-commits mailing list