]> granicus.if.org Git - clang/commitdiff
clang-format: Let Chromium use the Google default for AlignTrailingComments.
authorNico Weber <nicolasweber@gmx.de>
Wed, 7 Jan 2015 18:41:10 +0000 (18:41 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 7 Jan 2015 18:41:10 +0000 (18:41 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225363 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/Format.cpp

index adcb94f7b9dc0463401d13a79d5c8ce1ecfc2354..c7a760a515c16fb22ee6078f0d104f737713a2e3 100644 (file)
@@ -442,7 +442,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
 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;