This patch looks good. Please also change the vim-integration to not abandon
all formattings in case of stderr-output. Then submit both changes as closely
together as possible to minimize the time in which clang-format does something
unexpected.
================
Comment at: lib/Format/Format.cpp:1283
@@ -1278,2 +1282,3 @@
std::vector<CharSourceRange> Ranges) {
- Formatter formatter(Style, Lex, SourceMgr, Ranges);
+ IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
+ TextDiagnosticPrinter DiagnosticPrinter(llvm::errs(), &*DiagOpts);
----------------
This is good for now. In the future we'll probably have a second function in
the interface to which the DiagnosticsEngine can be passed..
http://llvm-reviews.chandlerc.com/D278
BRANCH
svn
ARCANIST PROJECT
clang
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits