[all-commits] [llvm/llvm-project] d40130: [doc] Fix namespace comment style in Coding Guidel...

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


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d40130199f766ca8c153d1cc61fec86d523aa81a
      https://github.com/llvm/llvm-project/commit/d40130199f766ca8c153d1cc61fec86d523aa81a
  Author: Carlos Galvez <carlosgalvezp at gmail.com>
  Date:   2021-12-07 (Tue, 07 Dec 2021)

  Changed paths:
    M llvm/docs/CodingStandards.rst

  Log Message:
  -----------
  [doc] Fix namespace comment style in Coding Guidelines

The Coding Guidelines specify that the ending brace of a
namespace shall have a comment like:

}  // end namespace clang

However the majority of the code uses a different style:

}  // namespace clang

Indeed:

$ git grep '// end' | wc -l
6724
$ git grep '// namespace' | wc -l
14348

Besides, this is the style enforced automatically by clang-format,
via the FixNamespaceComments option.

Having inconsistencies between the Coding Guidelines and the
code/tooling creates confusion, can lead to bikeshedding during
reviews and overall delays merging code. Therefore, update the
guidelines to reflect current usage. Updating legacy code to the
new standard should be done in a separate patch, if wanted.

Reviewed By: jyknight

Differential Revision: https://reviews.llvm.org/D115115




More information about the All-commits mailing list