aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-01 23:32:58 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-01 23:32:58 +0000
commitcf7b2afc62d6058717a06571dbd2d6c02d446f48 (patch)
tree984cd163711c1b5938a37430c165ede4a6ff4a4c /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parent2bbb86b02e0f5a37be5a256467a16165d57fb464 (diff)
downloadllvm-cf7b2afc62d6058717a06571dbd2d6c02d446f48.zip
llvm-cf7b2afc62d6058717a06571dbd2d6c02d446f48.tar.gz
llvm-cf7b2afc62d6058717a06571dbd2d6c02d446f48.tar.bz2
When printing a source line as part of a diagnostic, the source line
might be wider than we're supposed to print. In this case, we try to select the "important" subregion of the source line, which contains everything that we want to show (e.g., with underlining and the caret itself) and tries to also contain some of the context. From the fantastically long line in the test case, we get an error message that slices down to this: message-length.c:18:120: warning: comparison of distinct pointer types ('int *' and 'float *') a_func_to_call(ip == FloatPointer, ip[ALongIndexName], ~~ ^ ~~~~~~~~~~~~ There are a bunch of gee-it-sounds-good heuristics in here, which seem to do well on the various simple tests I've thrown at it. However, we're going to need to look at a bunch more diagnostics to tweak these heuristics. This is the second part of <rdar://problem/6711348>. Almost there! llvm-svn: 70597
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions