[PATCH] D68569: [clang-format] Also look for .{ext}.clang-format file
Anders Waldenborg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 8 02:06:31 PDT 2020
wanders abandoned this revision.
wanders added a comment.
In D68569#2019895 <https://reviews.llvm.org/D68569#2019895>, @MyDeveloperDay wrote:
> Can we abandon this review now we have the style=file:<filename>?
Yes, lets abandon this.
================
Comment at: clang/lib/Format/Format.cpp:2606
+ auto Extension(llvm::sys::path::extension(FileName));
+ if (Extension != "") {
+ FilesToLookFor.push_back((Extension + ".clang-format").str());
----------------
MyDeveloperDay wrote:
> if Extension is a std::string use if (!Extension.empty())
It is a StringRef (`StringRef llvm::sys::path::extension(StringRef path)`) but that also has `empty()`, thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68569/new/
https://reviews.llvm.org/D68569
More information about the cfe-commits
mailing list