[PATCH] D87587: [clang-format][PR47290] Make one-line namespaces resistant to FixNamespaceComments, update documentation

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 08:44:44 PDT 2020


MyDeveloperDay requested changes to this revision.
MyDeveloperDay added a comment.

I have a hard time when people change tests! just because one person wants them this way doesn't mean everyone will.

I am not sure about others but I'd be ok about seeing this as an option to override the value but not changing the default.

I like to think of unit tests as the "Beyonce Rule", "if you liked it you put a test on it!"... when people come along and say... "All these tests are wrong"... I start thinking... is this subjective or objective?

This would be a substantially smaller diff if you were adding the option.  (option/doc/test...)

Full context diff please too!



================
Comment at: clang/lib/Format/NamespaceEndCommentsFixer.cpp:28
+static const int kShortNamespaceMaxLines = 0;
 
 // Computes the name of a namespace given the namespace token.
----------------
I think change this will break the world... why don't we expose this as an option and not change everything!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87587



More information about the cfe-commits mailing list