r225363 - clang-format: Let Chromium use the Google default for AlignTrailingComments.

Nico Weber nicolasweber at gmx.de
Wed Jan 7 10:41:10 PST 2015


Author: nico
Date: Wed Jan  7 12:41:10 2015
New Revision: 225363

URL: http://llvm.org/viewvc/llvm-project?rev=225363&view=rev
Log:
clang-format: Let Chromium use the Google default for AlignTrailingComments.

r225141 changed the defaults of AllowShortIfStatementsOnASingleLine and
AlignTrailingComments for Google style and added explicit overrides for
Chromium style to undo these changes.  For AllowShortIfStatementsOnASingleLine
that's good as the Android style guide (which Chromium uses for Java) explicitly
permits single-line ifs. But it's silent on trailing comments, to it makes
sense for Chromium style to just follow Google style.

Modified:
    cfe/trunk/lib/Format/Format.cpp

Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=225363&r1=225362&r2=225363&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Wed Jan  7 12:41:10 2015
@@ -442,7 +442,6 @@ FormatStyle getGoogleStyle(FormatStyle::
 FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language) {
   FormatStyle ChromiumStyle = getGoogleStyle(Language);
   if (Language == FormatStyle::LK_Java) {
-    ChromiumStyle.AlignTrailingComments = true;
     ChromiumStyle.AllowShortIfStatementsOnASingleLine = true;
     ChromiumStyle.IndentWidth = 4;
     ChromiumStyle.ContinuationIndentWidth = 8;





More information about the cfe-commits mailing list