aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/PrintfFormatString.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-28 00:27:43 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-28 00:27:43 +0000
commit5352ac06d8f6194825bb2a99ffa009b61bafb503 (patch)
treee50e65bcdcd96fb196e24794c7086caa9b489bfd /lib/Analysis/PrintfFormatString.cpp
parentf291976ecf537dc4f2d5537b1664d47ff4b94865 (diff)
Implement a diagnostics callback for the C interface to Clang, so that
clients can format diagnostics as they wish rather than having to parse standard error. All of the important parts of the front end's diagnostics are exposed: text, severity, location, source ranges, and fix-its. The diagnostics callback is now available with clang_createTranslationUnitFromSource() and clang_createTranslationUnit(). As part of this change, CXSourceLocation and CXSourceRange got one pointer larger, since we need to hold on to the SourceManager and LangOptions structures in the source location. This is the minimum amount of information needed for the functions that operate on source locations and ranges (as implemented now). Previously we held on to the ASTContext, but the diagnostics callback can end up with source locations when there is no ASTContext (or preprocessor). Still to do: - Code completion needs to support the diagnostics callback, once we have the ability to (de-)serialize diagnostics. - Eliminate the "displayDiagnostics" argument to createIndex; we'll always pass diagnostics to the callback and let it deal with display. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94709 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/PrintfFormatString.cpp')
0 files changed, 0 insertions, 0 deletions