Add basic fix-its to SMDiagnostic.
authorJordan Rose <jordan_rose@apple.com>
Thu, 10 Jan 2013 18:50:15 +0000 (18:50 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 10 Jan 2013 18:50:15 +0000 (18:50 +0000)
commit9b1f44b147ff943729207be2b0509f6e53d62bbb
tree6ca8dcfc62f1ceafe5d55807c528aa3d94d9a279
parentb50df4a3df6db2ace3c011267934d3d10bdcc8db
Add basic fix-its to SMDiagnostic.

Like Clang's FixItHint, SMFixIt represents an insertion, replacement, or
removal of source text. One or more fix-its can be emitted as part of
a diagnostic, and will be printed below the source range line to show the
user how they can fix their code.

Currently, the only client of SMFixIt is clang-tblgen; thus, the tests for
this behavior live in clang/test/TableGen/tg-fixits.td. If/when SMFixIt is
adopted within LLVM itself, those tests should be moved to the LLVM suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172086 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/SourceMgr.h
lib/Support/SourceMgr.cpp