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

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 25 01:50:58 PDT 2018


ioeric added inline comments.


================
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"
----------------
sammccall wrote:
> 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.
Can't see a reason not to. This should help get rid of more hardcode.


Repository:
  rC Clang

https://reviews.llvm.org/D48492





More information about the cfe-commits mailing list