]> granicus.if.org Git - clang/commit
[clang][HeaderSuggestion] Handle the case of dotdot with an absolute path
authorKadir Cetinkaya <kadircet@google.com>
Wed, 24 Apr 2019 09:23:31 +0000 (09:23 +0000)
committerKadir Cetinkaya <kadircet@google.com>
Wed, 24 Apr 2019 09:23:31 +0000 (09:23 +0000)
commit62041af5673ae85b83198872b2bc17ebd1d3668a
treed26e24ce3d49bbd62fed7ae52aa8add27da4ce99
parent14dec3f3c53452cd32e65f38b6f241a9ed4584c9
[clang][HeaderSuggestion] Handle the case of dotdot with an absolute path

Summary:
Include insertion in clangd was inserting absolute paths when the
include directory was an absolute path with a double dot. This patch makes sure
double dots are handled both with absolute and relative paths.

Reviewers: sammccall

Subscribers: ilya-biryukov, ioeric, jkorous, arphaman, cfe-commits

Tags: #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359078 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Lex/HeaderSearch.cpp
unittests/Lex/HeaderSearchTest.cpp