diff options
author | Reid Kleckner <rnk@google.com> | 2015-12-08 01:08:09 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2015-12-08 01:08:09 +0000 |
commit | da30cff9ef2e22cf9e8e307f132976a15feacdf8 (patch) | |
tree | e4eca8e8c158a19eef3fe36b328e0123b16041db /lldb/packages/Python/lldbsuite/test/benchmarks | |
parent | e6b36cdd4d571c91081e2d5f8c0b31830093d110 (diff) | |
download | bcm5719-llvm-da30cff9ef2e22cf9e8e307f132976a15feacdf8.tar.gz bcm5719-llvm-da30cff9ef2e22cf9e8e307f132976a15feacdf8.zip |
[diagnostics] Avoid crashes while printing macro backtraces
When attempting to map a source into a given level of macro expansion,
this code was ignoring the possibility that the start and end of the
range might take wildly different paths through the tree of macro
expansions. It was assuming that the begin spelling location would
always precede the end spelling location, which is false. A macro can
easily transpose its arguments.
This also fixes a related issue where there are extra macro arguments
between the begin location and the end location. In this situation, we
now highlight the entire macro invocation.
Pair programmed with Richard Smith.
Fixes PR12818.
llvm-svn: 254981
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/benchmarks')
0 files changed, 0 insertions, 0 deletions