llvm-project/clang-tools-extra
Marc-Andre Laperle ba070108a6 [clangd] Fix opening declarations located in non-preamble inclusion
Summary:
When an inclusion is not processed as part of the preamble, its path is
not made into an absolute path as part of the precompiled header code
(adjustFilenameForRelocatableAST in ASTWriter.cpp). Because of this,
when we convert a Decl location to retrieve the file name with
FileEntry->getName(), it is possible for this path to be relative.
Instead, we should try to use tryGetRealPathName first which returns
an absolute path.

Fixes bug 35217.

Reviewers: sammccall, ilya-biryukov, rwols, Nebiroth

Reviewed By: sammccall

Subscribers: cfe-commits, ilya-biryukov

Tags: #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D39705

llvm-svn: 317585
2017-11-07 16:16:45 +00:00
..
change-namespace [change-namespace] do not change type locs in defaulted functions. 2017-10-16 08:20:10 +00:00
clang-apply-replacements [clang-tidy] clang-apply-replacements: Don't insert null entry 2017-07-25 14:28:16 +00:00
clang-move [clang-move] Find template class forward declarations more precisely. 2017-05-02 12:15:11 +00:00
clang-query [NFC] Update to account for DiagnosticRenderer use of FullSourceLoc 2017-06-27 10:04:04 +00:00
clang-reorder-fields [clang-reorder-fields] Switch to add_clang_tool 2017-11-02 01:10:05 +00:00
clang-tidy [clang-tidy] Misc redundant expressions checker updated for macros 2017-11-07 13:17:58 +00:00
clang-tidy-vs Remove 'misc-pointer-and-integral-operation' clang-tidy check. The only cases 2016-10-21 21:50:28 +00:00
clangd [clangd] Fix opening declarations located in non-preamble inclusion 2017-11-07 16:16:45 +00:00
docs [clang-tidy] Misc redundant expressions checker updated for macros 2017-11-07 13:17:58 +00:00
include-fixer Adapt clang-tidy checks to changing semantics of hasDeclaration. 2017-08-02 13:13:11 +00:00
modularize Support: Have directory_iterator::status() return FindFirstFileEx/FindNextFile results on Windows. 2017-10-10 22:19:46 +00:00
pp-trace [Support] Rename tool_output_file to ToolOutputFile, NFC 2017-09-23 01:03:17 +00:00
test [clangd] Fix initialize capabilities response 2017-11-07 15:49:35 +00:00
tool-template Use ToolExecutor framework in the sample tool-template. 2017-11-03 16:03:56 +00:00
unittests [clangd] MSVC - third time's the charm 2017-11-07 14:59:21 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.gitignore
CMakeLists.txt [cmake] Support running extra clang tool tests without static analyzer 2017-08-29 05:58:08 +00:00
CODE_OWNERS.TXT Updating the code owners list. 2015-09-02 20:00:41 +00:00
LICENSE.TXT Rename the clang-tidy safety module to be hicpp, for the High-Integrity C++ coding standard from PRQA. 2017-03-19 17:23:23 +00:00
README.txt Update references to new lists.llvm.org mailing lists. 2015-08-05 03:56:44 +00:00

README.txt

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

This repository is only intended to be checked out inside of a full LLVM+Clang
tree, and in the 'tools/extra' subdirectory of the Clang checkout.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang mailing lists:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.llvm.org/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/