[PATCH] D30111: [clang-format] Add a test to check at once all the Mozilla coding style

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 28 07:31:48 PST 2017


krasimir added a comment.

In https://reviews.llvm.org/D30111#688379, @sylvestre.ledru wrote:

> @krasimir is that ok with you?


Thank you for addressing my comments! The descriptions help to see what's supposed to happen.

Now another point with this test is that it tests that already Mozilla-valid source is not changed.
Maybe this is the right approach for a full style sanity test, I don't know.



================
Comment at: unittests/Format/check-coding-style-mozilla.cpp:77
+    return mVar;
+  } // Tiny functions can be written in a single line.
+
----------------
Note that here the trailing comment will make a version of `TinyFunction` on a single line exceed the line limit.
If the comment is put before the definition of `TinyFunction`, it could really be made tiny, as in:
```
  // Tiny functions can be written in a single line.
  int TinyFunction() { return mVar; }
```


https://reviews.llvm.org/D30111





More information about the cfe-commits mailing list