[cfe-commits] [PATCH] Basic support for diagnostics.
Daniel Jasper
djasper at google.com
Thu Jan 10 06:39:09 PST 2013
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
More information about the cfe-commits
mailing list