[PATCH] D103142: [clang][clangd] Use reverse header map lookup in suggestPathToFileForDiagnostics
Dmitry Polukhin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 26 01:50:52 PDT 2021
DmitryPolukhin created this revision.
DmitryPolukhin added reviewers: dexonsmith, bruno, rsmith.
DmitryPolukhin added a project: clang.
Herald added subscribers: usaxena95, ormris, kadircet, arphaman.
DmitryPolukhin requested review of this revision.
Herald added subscribers: MaskRay, ilya-biryukov.
suggestPathToFileForDiagnostics is actively used in clangd forĀ converting
an absolute path to a header file to a header name as it should be spelled
in the sources. Current approach converts absolute path to relative path.
This diff implements missing logic that makes a reverse lookup from the
relative path to the key in the header map that should be used in the sources.
Test Plan: check-clang
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D103142
Files:
clang/include/clang/Lex/HeaderMap.h
clang/lib/Lex/HeaderMap.cpp
clang/lib/Lex/HeaderSearch.cpp
clang/unittests/Lex/HeaderMapTest.cpp
clang/unittests/Lex/HeaderMapTestUtils.h
clang/unittests/Lex/HeaderSearchTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103142.347861.patch
Type: text/x-patch
Size: 15758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210526/e00e7bc3/attachment.bin>
More information about the cfe-commits
mailing list