[PATCH] D28165: Change clang-format's Chromium JavaScript defaults
Nico Weber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 3 09:38:21 PST 2017
thakis added inline comments.
================
Comment at: lib/Format/Format.cpp:643
+ ChromiumStyle.AllowShortIfStatementsOnASingleLine = false;
+ ChromiumStyle.AllowShortLoopsOnASingleLine = false;
+ }
----------------
Thanks for the patch! Do we want these as false in Chromium's JS? I would've thought the diff would just be
```
- } else {
+ } else if (Language != FormatStyle::LK_JavaScript)
```
so that we just use google style for JS.
If we do want to deviate from google style here for some reason then
a) say why somewhere
b) change the check for cpp to also include `|| Language == FormatStyle::LK_ObjC`
(If you include more diff context as described on http://llvm.org/docs/Phabricator.html, reviewing on phab is a bit easier.)
https://reviews.llvm.org/D28165
More information about the cfe-commits
mailing list