On Fri, Jan 31, 2014 at 6:08 AM, Benjamin Smedberg <benja...@smedbergs.us> wrote: > > I'm not sure that we need to fix all the problems in order to be useful. I'd > certainly automatically-generated whole-file patches which just do > re-indenting and some simple brace fixup.
Attachment https://bugzilla.mozilla.org/attachment.cgi?id=8369843 in https://bugzilla.mozilla.org/show_bug.cgi?id=966840 shows the difference between some style fixes I did by hand for nsMemoryReporterManager.{cpp,h} and what clang-format produced. One big issue was that clang-format changes lots of whitespace in the middle and the end of lines. Some examples follow, where the '-' lines show what the code looked like after my changes, the '+' lines show what the code looked like after clang-format's changes, and you'll want to view this in a fixed-width font... - nsresult RegisterReporterHelper(nsIMemoryReporter* aReporter, - bool aForce, bool aStrongRef); + nsresult RegisterReporterHelper(nsIMemoryReporter* aReporter, bool aForce, + bool aStrongRef); and - uint32_t mGeneration; - nsCOMPtr<nsITimer> mTimer; - uint32_t mNumChildProcesses; - uint32_t mNumChildProcessesCompleted; - nsCOMPtr<nsIHandleReportCallback> mHandleReport; - nsCOMPtr<nsISupports> mHandleReportData; + uint32_t mGeneration; + nsCOMPtr<nsITimer> mTimer; + uint32_t mNumChildProcesses; + uint32_t mNumChildProcessesCompleted; + nsCOMPtr<nsIHandleReportCallback> mHandleReport; + nsCOMPtr<nsISupports> mHandleReportData; and #if defined(MOZ_MEMORY) -# define HAVE_JEMALLOC_STATS 1 -# include "mozmemory.h" -#endif // MOZ_MEMORY +#define HAVE_JEMALLOC_STATS 1 +#include "mozmemory.h" +#endif // MOZ_MEMORY In other words, lots of unnecessary churn, and the clang-format results are IMO inferior. Combine that with the fact that clang-format as configured only changes whitespace -- no brace insertion, no parameter/member renaming, etc, etc -- and even using it as a first step prior to hand-written changes is looking dubious, IMO. Can we just allow hand-written fixes and move forward, please? Nick _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform