[PATCH] D48492: [clang-format] Add a default format style that can be used by users of `getStyle`

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 22 12:43:48 PDT 2018


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

I think this should work great for us, and hopefully helps other downstream users too.

(@djasper: the plan is to introduce a new style name for our tweaked version of `"file"`, and make it the default)



================
Comment at: tools/clang-format/ClangFormat.cpp:67
 static cl::opt<std::string>
 FallbackStyle("fallback-style",
               cl::desc("The name of the predefined style used as a\n"
----------------
My only question is if we want to do the same with DefaultFallbackStyle.

Not because we have a use case for changing it right now, but because it's another string that callers of getStyle() have to hard-code. In our internal codebase, some pass "LLVM", some pass "Google", and some make it an option.


Repository:
  rC Clang

https://reviews.llvm.org/D48492





More information about the cfe-commits mailing list