Have clang_getSpellingLocation() use the same logic as DiagnosticRenderer for plowing...
authorTed Kremenek <kremenek@apple.com>
Tue, 18 Dec 2012 23:07:30 +0000 (23:07 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 18 Dec 2012 23:07:30 +0000 (23:07 +0000)
commite3713d3025e1f76f6c40e0c6553a6fab6d427e0a
tree9b57f420a3b57f9a172867bcefdf06dfec5ef773
parent9b7ab87738a6e4225005cff36e7aa1e735df5236
Have clang_getSpellingLocation() use the same logic as DiagnosticRenderer for plowing through macros.

This fixes a subtle bug reported in <rdar://problem/12584554> where a double-nested
macro could lead to an incorrect fixit location with live issues.

This fix also uncovers a bunch of subtle bugs in our indexer test cases which
are now fixed (mostly around source ranges for attributes).

llvm-svn: 170468
clang/test/Index/c-index-api-loadTU-test.m
clang/test/Index/fix-its.m [new file with mode: 0644]
clang/test/Index/preamble_macro_template.cpp
clang/tools/libclang/CXSourceLocation.cpp