[PATCH] Added an option to specify fallback style.
Daniel Jasper
djasper at google.com
Mon Dec 2 05:33:53 PST 2013
================
Comment at: include/clang/Format/Format.h:411
@@ -409,1 +410,3 @@
+FormatStyle getStyle(StringRef StyleName, StringRef FileName,
+ StringRef FallbackStyle);
----------------
This will break
clang/tools/extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp.
and possibly others? So either fix all instances or add a default value.
================
Comment at: lib/Format/Format.cpp:1736
@@ -1733,3 +1735,3 @@
}
llvm::errs() << "Can't find usable .clang-format, using " << FallbackStyle
<< " style\n";
----------------
Having any output in this case breaks the current emacs integration. I have not found an easy way to work around this (i.e. to send stderr or stdout to different buffers).
I think, if -fallback-style is present, we should silently fall back to it.
http://llvm-reviews.chandlerc.com/D2292
More information about the cfe-commits
mailing list