<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/clang/test/Format, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2019-10-13T14:51:45+00:00</updated>
<entry>
<title>[clang-format] Proposal for clang-format to give compiler style warnings</title>
<updated>2019-10-13T14:51:45+00:00</updated>
<author>
<name>Paul Hoad</name>
<email>mydeveloperday@gmail.com</email>
</author>
<published>2019-10-13T14:51:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=6a1f7d6c9ff8228328d0e65b8678a9c6dff49837'/>
<id>urn:sha1:6a1f7d6c9ff8228328d0e65b8678a9c6dff49837</id>
<content type='text'>
relanding {D68554} with fixed lit tests, checked on Windows and MacOS

llvm-svn: 374720
</content>
</entry>
<entry>
<title>Revert r374663 "[clang-format] Proposal for clang-format to give compiler style warnings"</title>
<updated>2019-10-12T22:58:34+00:00</updated>
<author>
<name>Nico Weber</name>
<email>nicolasweber@gmx.de</email>
</author>
<published>2019-10-12T22:58:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=e95d1ca1e2e24ffddd10bd890ed18280b8e415a2'/>
<id>urn:sha1:e95d1ca1e2e24ffddd10bd890ed18280b8e415a2</id>
<content type='text'>
The test fails on macOS and looks a bit wrong, see comments on the review.

Also revert follow-up r374686.

llvm-svn: 374688
</content>
</entry>
<entry>
<title>[clang-format] Proposal for clang-format to give compiler style warnings</title>
<updated>2019-10-12T15:36:05+00:00</updated>
<author>
<name>Paul Hoad</name>
<email>mydeveloperday@gmail.com</email>
</author>
<published>2019-10-12T15:36:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=1f20bc17d005fb37816fac95955ec4a36f9de26f'/>
<id>urn:sha1:1f20bc17d005fb37816fac95955ec4a36f9de26f</id>
<content type='text'>
Summary:
Related somewhat to {D29039}

On seeing a quote on twitter by @invalidop

&gt; If it's not formatted with clang-format it's a build error.

This made me want to change the way I use clang-format into a tool that could optionally show me where my source code violates clang-format syle.

When I'm making a change to clang-format itself, one thing I like to do to test the change is to ensure I didn't cause a huge wave of changes, what I want to do is simply run this on a known formatted directory and see if any new differences arrive in a manner I'm used to.

This started me thinking that we should allow build systems to run clang-format on a whole tree and emit compiler style warnings about files that fail clang-format in a form that would make them as a warning in most build systems and because those build systems range in their construction I don't think its unreasonable to NOT expect them to have to do the directory searching or parsing the output replacements themselves, but simply transform that into an error code when there are changes required.

I am starting this by suggesing adding a -n or -dry-run command line argument which would emit a warning/error of the form

Support for various common compiler command line argumuments like '-Werror' and '-ferror-limit' could make this very flexible to be integrated into build systems and CI systems.

```
&gt; $ /usr/bin/clang-format --dry-run ClangFormat.cpp -ferror-limit=3 -fcolor-diagnostics
&gt; ClangFormat.cpp:54:29: warning: code should be clang-formatted [-Wclang-format-violations]
&gt; static cl::list&lt;std::string&gt;
&gt;                             ^
&gt; ClangFormat.cpp:55:20: warning: code should be clang-formatted [-Wclang-format-violations]
&gt; LineRanges("lines", cl::desc("&lt;start line&gt;:&lt;end line&gt; - format a range of\n"
&gt;                    ^
&gt; ClangFormat.cpp:55:77: warning: code should be clang-formatted [-Wclang-format-violations]
&gt; LineRanges("lines", cl::desc("&lt;start line&gt;:&lt;end line&gt; - format a range of\n"
&gt;                                                                             ^
```

Reviewers: mitchell-stellar, klimek, owenpan

Reviewed By: klimek

Subscribers: mgorny, cfe-commits

Tags: #clang-format, #clang-tools-extra, #clang

Differential Revision: https://reviews.llvm.org/D68554

llvm-svn: 374663
</content>
</entry>
<entry>
<title>Re-land Remove REQUIRES:shell from tests that pass for me on Windows</title>
<updated>2019-09-10T20:15:45+00:00</updated>
<author>
<name>Reid Kleckner</name>
<email>rnk@google.com</email>
</author>
<published>2019-09-10T20:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=38e033bf33e8a8261d1d4497524fe75ef3486a9a'/>
<id>urn:sha1:38e033bf33e8a8261d1d4497524fe75ef3486a9a</id>
<content type='text'>
This reverts r371497 (git commit 3d7e9ab7b9f8c53aa41420c54970f0fb421004a2)

Reorder `not` with `env` in these two tests so they pass:
  Driver/rewrite-map-in-diagnostics.c
  Index/crash-recovery-modules.m.

This will not be necessary after D66531 lands.

llvm-svn: 371552
</content>
</entry>
<entry>
<title>Revert Remove REQUIRES:shell from tests that pass for me on Windows</title>
<updated>2019-09-10T08:48:33+00:00</updated>
<author>
<name>James Henderson</name>
<email>jh7370@my.bristol.ac.uk</email>
</author>
<published>2019-09-10T08:48:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=3d7e9ab7b9f8c53aa41420c54970f0fb421004a2'/>
<id>urn:sha1:3d7e9ab7b9f8c53aa41420c54970f0fb421004a2</id>
<content type='text'>
This reverts r371478 (git commit a9980f60ce083fa6d5fd03c12c58ca0b293e3d60)

llvm-svn: 371497
</content>
</entry>
<entry>
<title>Remove REQUIRES:shell from tests that pass for me on Windows</title>
<updated>2019-09-10T00:50:32+00:00</updated>
<author>
<name>Reid Kleckner</name>
<email>rnk@google.com</email>
</author>
<published>2019-09-10T00:50:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=a9980f60ce083fa6d5fd03c12c58ca0b293e3d60'/>
<id>urn:sha1:a9980f60ce083fa6d5fd03c12c58ca0b293e3d60</id>
<content type='text'>
I see in the history for some of these tests REQUIRES:shell was used as
a way to disable tests on Windows because they are flaky there. I tried
not to re-enable such tests, but it's possible that I missed some and
this will re-enable flaky tests on Windows. If so, we should disable
them with UNSUPPORTED:system-windows and add a comment that they are
flaky there. So far as I can tell, the lit internal shell is capable of
running all of these tests, and we shouldn't use REQUIRES:shell as a
proxy for Windows.

llvm-svn: 371478
</content>
</entry>
<entry>
<title>[clang-format][tests] Explicitly specify style in some tests</title>
<updated>2019-07-12T15:56:18+00:00</updated>
<author>
<name>Rafael Stahl</name>
<email>r.stahl@tum.de</email>
</author>
<published>2019-07-12T15:56:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=f625a8a250b393b29a277ca790f6bc2fce7aa192'/>
<id>urn:sha1:f625a8a250b393b29a277ca790f6bc2fce7aa192</id>
<content type='text'>
Summary: This fixes broken tests when doing an out-of-source build that picks up a random .clang-format on the file system due to the default "file" style.

Reviewers: djasper, klimek, MyDeveloperDay, krasimir

Reviewed By: MyDeveloperDay

Subscribers: lebedev.ri, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61001

llvm-svn: 365909
</content>
</entry>
<entry>
<title>[clang-format] Fix bug where -dump-config failed on ObjC header</title>
<updated>2018-01-29T17:36:43+00:00</updated>
<author>
<name>Ben Hamilton</name>
<email>benhamilton@google.com</email>
</author>
<published>2018-01-29T17:36:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=6845dec91715ee1fc9939053b8add76cacced6ef'/>
<id>urn:sha1:6845dec91715ee1fc9939053b8add76cacced6ef</id>
<content type='text'>
Summary:
`clang-format -dump-config path/to/file.h` never passed
anything for the Code parameter to clang::format::getStyle().

This meant the logic to guess Objective-C from the contents
of a .h file never worked, because LibFormat didn't have the
code to work with.

With this fix, we now correctly read in the contents of the
file if possible with -dump-config.

I had to update the lit config for test/Format/ because
the default config ignores .h files.

Test Plan: make -j12 check-clang

Reviewers: jolesiak, krasimir

Reviewed By: jolesiak, krasimir

Subscribers: Wizard, klimek, cfe-commits, djasper

Differential Revision: https://reviews.llvm.org/D42395

llvm-svn: 323668
</content>
</entry>
<entry>
<title>[clang] Get rid of "%T" expansions</title>
<updated>2017-08-15T19:47:06+00:00</updated>
<author>
<name>Kuba Mracek</name>
<email>mracek@apple.com</email>
</author>
<published>2017-08-15T19:47:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=5b57633a45a5072b4292a98d68eb4ddb4f2b63b6'/>
<id>urn:sha1:5b57633a45a5072b4292a98d68eb4ddb4f2b63b6</id>
<content type='text'>
The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t.

This patch removes %T in clang.

Differential Revision: https://reviews.llvm.org/D36437

llvm-svn: 310950
</content>
</entry>
<entry>
<title>clang-format: add an option -verbose to list the files being processed</title>
<updated>2017-08-12T15:15:10+00:00</updated>
<author>
<name>Sylvestre Ledru</name>
<email>sylvestre@debian.org</email>
</author>
<published>2017-08-12T15:15:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d23dd6c633b1865cfabd548099814f6943e1760e'/>
<id>urn:sha1:d23dd6c633b1865cfabd548099814f6943e1760e</id>
<content type='text'>
Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D34824

llvm-svn: 310778
</content>
</entry>
</feed>
