[llvm-dev] [docs][RFC] Style for "end namespace" comments

Salman Javed via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 7 01:32:01 PST 2021


On 12/6/21 12:47 PM, James Y Knight via llvm-dev wrote:
> That said, we should update the coding guidelines to recommend the 
> format which clang-tidy emits -- just to make everyone's lives easier.
As a newcomer to this project, this would make my life easier. Before 
submitting a patch for a review, I want to have some confidence that I 
haven't made some rookie mistake (missing namespace closing comments 
being a perfect example), so naturally I will run clang-tidy and 
clang-format. Then the reviewer can spend more time looking at the meat 
of my patch, rather than acting like a kind of human 
clang-format/clang-tidy pre-merge tool.

If the coding guidelines document defaulted to clang-tidy's suggested 
namespace comment style, that would cause the least amount of confusion 
for me. I will follow that style for any new namespaces I introduce to 
the code base.

I wouldn't go out and proclaim that all existing code that uses the 
other style ("end namespace clang") is now in direct violation of the 
guidelines and must be changed, though.


More information about the llvm-dev mailing list