[PATCH] D68569: [clang-format] Also look for .{ext}.clang-format file

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 7 04:26:32 PDT 2019


MyDeveloperDay added a comment.

Thanks for the patch, I think I understand what you are trying to do, but I have a few questions.

Is the premise here that you need slightly different styles for .cpp than for .h? could you explain why?

whilst I can see there is value in having such fine control, could you explain a little what leads you to needing that? because it feels like you are almost saying a bug in clang-format prevents me from using a single file and I'd like to understand if that is the case?



================
Comment at: clang/lib/Format/Format.cpp:2606
+  auto Extension(llvm::sys::path::extension(FileName));
+  if (Extension != "") {
+    FilesToLookFor.push_back((Extension + ".clang-format").str());
----------------
if Extension is a std::string use    if (!Extension.empty())


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