[PATCH] D54691: [FileManager] getFile(open=true) after getFile(open=false) should open the file.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 19 01:11:50 PST 2018


sammccall created this revision.
sammccall added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, kadircet, ioeric.

Old behavior is to just return the cached entry regardless of opened-ness.
That feels buggy (though I guess nobody ever actually needed this).

This came up in the context of clangd+clang-tidy integration: we're
going to getFile(open=false) to replay preprocessor actions obscured by
the preamble, but the compilation may subsequently getFile(open=true)
for non-preamble includes.


Repository:
  rC Clang

https://reviews.llvm.org/D54691

Files:
  include/clang/Basic/FileManager.h
  lib/Basic/FileManager.cpp
  unittests/Basic/FileManagerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54691.174567.patch
Type: text/x-patch
Size: 5501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181119/9319e1d0/attachment.bin>


More information about the cfe-commits mailing list