diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-09-07 08:05:58 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-09-07 08:05:58 +0000 |
commit | 5770bb707db9169c258859a9e7c935f99a32d64c (patch) | |
tree | 7df1f14a23f48774423bba997c5ffd6520dfdfc2 /lib/Lex/Preprocessor.cpp | |
parent | 6c57ccec994f09d732a381bb4bb16c79d181e5ac (diff) |
Extract the emission of the diagnostic's location into a separate
function. This is really the beginning of the second phase of
refactorings here. The end goal is to have (roughly) three interfaces:
1) Base class to format a single diagnostic suitable for display on the
console.
2) Extension of the base class which also displays a caret diagnostic
suitable for display on the console.
3) An adaptor that implements the DiagnosticClient by delegating to #1
and/or #2 as appropriate.
Once we have these, things like libclang's formatDiagnostic can use #1
and #2 to provide really well formatted (and consistently formatted!)
textual formatting of diagnostics.
Getting there is going to be quite a bit of shuffling. I'm basically
sketching out where the interface boundaries can be drawn for #1 and #2
within the existing classes. That lets me shuffle with a minimum of fuss
and delta. Once that's done, and any of the related interfaces that need
to change are updated, I'll hoist these into separate headers and
re-implement libclang in terms of their interfaces. Long WIP, but
comments at each step welcome. =D
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
0 files changed, 0 insertions, 0 deletions