[clang][FileManager] fillRealPathName even if we aren't opening the file
authorJan Korous <jkorous@apple.com>
Thu, 14 Feb 2019 23:02:35 +0000 (23:02 +0000)
committerJan Korous <jkorous@apple.com>
Thu, 14 Feb 2019 23:02:35 +0000 (23:02 +0000)
commit85eb363d56d40b83880d310a1b53855a68e873c9
tree0961300b38a0edd27ce2606e2d47a2a6627f6f1b
parentd5b017d601b483553f314db36c23aa1c11e0bb78
[clang][FileManager] fillRealPathName even if we aren't opening the file

The pathname wasn't previously filled when the getFile() method was called with openFile = false.
We are caching FileEntry-s in ParsedAST::Includes in clangd and this caused the problem.

This fixes an internal test failure in clangd - ClangdTests.GoToInclude.All

rdar://47536127

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

llvm-svn: 354075
clang/lib/Basic/FileManager.cpp
clang/unittests/Basic/FileManagerTest.cpp