[PATCH] D45014: [Index] Return SourceLocation to consumers, not FileID/Offset pair.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 28 20:05:02 PDT 2018
sammccall created this revision.
sammccall added reviewers: akyrtzi, arphaman.
Herald added subscribers: cfe-commits, ioeric, ilya-biryukov.
The FileID/Offset conversion is lossy. The code takes the fileLoc, which loses
e.g. the spelling location in some macro cases.
Instead, pass the original SourceLocation which preserves all information, and
update consumers to match current behavior.
This allows us to fix two bugs in clangd that need the spelling location.
Repository:
rC Clang
https://reviews.llvm.org/D45014
Files:
include/clang/Index/IndexDataConsumer.h
lib/Index/IndexingAction.cpp
lib/Index/IndexingContext.cpp
tools/c-index-test/core_main.cpp
tools/libclang/CXIndexDataConsumer.cpp
tools/libclang/CXIndexDataConsumer.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45014.140182.patch
Type: text/x-patch
Size: 8536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180329/1d1692e2/attachment-0001.bin>
More information about the cfe-commits
mailing list