r292562 - clang-format: fix fallback style set to "none" not always formatting

Björn Pettersson A via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 20 10:58:00 PST 2017


Hello Antonio and Mikael.

I've tried reproducing this also after removal of the redundant test (D28943), and I still see the fail for CHECK10.

The problem is that we (both me an Mikael) are running this test from inside our llvm repo (with build&test artifacts ending up in  a "build-all" directory inside the llvm clone).

So if I run the test with -debug I can see that it is searching for the format file like this:

Trying /repo/llvm/build-all/tools/clang/test/Format/Output/.clang-format...
Trying /repo/llvm/build-all/tools/clang/test/Format/Output/_clang-format...
Trying /repo/llvm/build-all/tools/clang/test/Format/.clang-format...
Trying /repo/llvm/build-all/tools/clang/test/Format/_clang-format...
Trying /repo/llvm/build-all/tools/clang/test/.clang-format...
Trying /repo/llvm/build-all/tools/clang/test/_clang-format...
Trying /repo/llvm/build-all/tools/clang/.clang-format...
Trying /repo/llvm/build-all/tools/clang/_clang-format...
Trying /repo/llvm/build-all/tools/.clang-format...
Trying /repo/llvm/build-all/tools/_clang-format...
Trying /repo/llvm/build-all/.clang-format...
Trying /repo/llvm/build-all/_clang-format...
Trying /repo/llvm/.clang-format...
Using configuration file /repo/llvm/.clang-format


So the test case will find the format file that exists in the llvm repository and it uses that one (and not the one defined as a fallback).

I'm not sure that there is a rule against having the build&test artifacts inside the repo. I think there are both pros and cons to have such a setup. And it is something that has been working well for us so far.

Regards
/Björn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170120/7ee9531f/attachment.html>


More information about the cfe-commits mailing list