[cfe-dev] clang-format turning tests into no-ops

Daniel Jasper djasper at google.com
Thu Nov 7 22:51:26 PST 2013


That should be easy enough. We simply need a .clang-format file in the test
suites removing the column limit.

Done in r194248 and r194221, respectively.


On Thu, Nov 7, 2013 at 9:49 PM, Alp Toker <alp at nuanti.com> wrote:

>  Hi Daniel,
>
> Here's a good one for you..
>
> I've recently been fixing a whole lot of lit tests in the LLVM / clang
> suites that don't check anything.
>
> It was a mystery why people keep checking in tests like this:
>
> // RUN: clang-check "%s" -- -target x86_64-apple-darwin10 -fasm-blocks
> 2>&1 |
> // FileCheck %s
>
> The first line will run successfully, and the second doesn't begin with
> RUN so the test passes silently. Not good.
>
> Then it dawned on me -- contributors must be running clang-format before
> committing, causing their RUN lines to get split up at the line boundary.
>
> I know this isn't strictly a clang-format bug, but it's time consuming to
> manually audit and find no-op tests like this after the fact and the
> failure mode is insidious because these tests will always silently pass.
>
> I was wondering if you can think of a way to exclude the test suites from
> clang-format and clang-format-diff runs. Guessing this could be tricky
> given that there are several different ways to run clang-format but
> something needs to be done..
>
> Alp.
>
> -- http://www.nuanti.com
> the browser experts
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131107/8d185fb2/attachment.html>


More information about the cfe-dev mailing list