From: Nico Weber Date: Wed, 7 Jan 2015 18:41:10 +0000 (+0000) Subject: clang-format: Let Chromium use the Google default for AlignTrailingComments. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1a1f7ecdf5a43bde4775bff8c1cc1f8727294cb;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225363 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index adcb94f7b9..c7a760a515 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -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;