This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Make PreambleStatusCache handle filenames more carefully
ClosedPublic

Authored by sammccall on Jun 28 2019, 7:16 AM.

Details

Summary
  • when we hit the cache, the reported filename should be that of the cache query, not that of the cache store. This matches behaviors of common FSes, and avoids triggering difficult edge cases in FileManager when files are being moved around concurrently.
  • filename comparisons (both cache queries and == mainfile checks) should fold away . and .. in paths. These can appear when relative paths occur in compile_commands.json. (gn does this).

Diff Detail

Repository
rL LLVM

Event Timeline

sammccall created this revision.Jun 28 2019, 7:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2019, 7:16 AM
tbodt added a subscriber: tbodt.Jun 30 2019, 6:04 AM
kadircet accepted this revision.Jul 1 2019, 1:30 AM

LGTM, thanks

This revision is now accepted and ready to land.Jul 1 2019, 1:30 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 1 2019, 3:11 AM