[PATCH] D72326: [clang-format] Rebased on master: Add option to specify explicit config file
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 25 07:40:41 PST 2021
MyDeveloperDay added a comment.
The reason I have picked this us was because of:
https://twitter.com/bruxisma/status/1462987809879257101
This slightly annoys me because :
a) What they were talking about was in my view is disrespectful and inaccurate.
b) I thought we'd already landed this (which we had)
I went looking for this review which had previously been accepted and landed, but got reverted because it seemed to fail the tests
The original author and the original-original-author has both obviously moved on a dropped it and so it didn't get fixed.
I don't like wasting all that effort, especailly if we are going to get grief for it. So I rebased the review so we can land it again, (and checked both the unit tests and lit tests)
I hope we don't have to go around the houses on this too much.
================
Comment at: clang/lib/Format/Format.cpp:3274
+ llvm::SmallVector<std::string, 2> FilesToLookFor;
+ // User provided clang-format file using -style=file:/path/to/format/file
+ // Check for explicit config filename
----------------
HazardyKnusperkeks wrote:
> MyDeveloperDay wrote:
> > part of me wonders if this format should be
> >
> > `file://<path>` rather than `file:<path>`
> >
> > ```User provided clang-format file using -style=file:///path/to/format/file```
> >
> > vs
> >
> > ```User provided clang-format file using -style=file:/path/to/format/file```
> >
> > This would leave the way open to other protocols http:// or https:// or anything else.
> Maybe, but I doubt we want http. And if we use `file://` a windows path `D:\Path\` would not be valid, would it?
yes file://C:\Windows\Kernel32.dll is a valid file url.
but I on reflection I think `file:` will be ok.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72326/new/
https://reviews.llvm.org/D72326
More information about the cfe-commits
mailing list