summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Tooling/DependencyScannerTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use FileEntryRef for PPCallbacks::HasIncludeAlex Lorenz2019-08-271-0/+35
| | | | | | | | This fixes the issue where a filename dependendency was missing if the file that was referenced with __has_include() was accessed through a symlink in an earlier run, if the file manager was reused between runs. llvm-svn: 370081
* Use FileEntryRef for PPCallbacks::FileSkippedAlex Lorenz2019-08-271-1/+41
| | | | | | | | This fixes the issue where a filename dependendency was missing if the file that was skipped was included through a symlink in an earlier run, if the file manager was reused between runs. llvm-svn: 369998
* Re-enable DependencyScannerTest on windows with the right fixesAlex Lorenz2019-08-241-13/+16
| | | | | | It should now pass. llvm-svn: 369832
* Disable the ScanDepsReuseFilemanager test on WindowsAlex Lorenz2019-08-221-0/+4
| | | | | | | Right now it fails. I'm going to investigate it and fix it in follow-up commits. llvm-svn: 369688
* Introduce FileEntryRef and use it when handling includes to report correct ↵Alex Lorenz2019-08-221-0/+118
dependencies when the FileManager is reused across invocations This commit introduces a parallel API to FileManager's getFile: getFileEntryRef, which returns a reference to the FileEntry, and the name that was used to access the file. In the case of a VFS with 'use-external-names', the FileEntyRef contains the external name of the file, not the filename that was used to access it. The new API is adopted only in the HeaderSearch and Preprocessor for include file lookup, so that the accessed path can be propagated to SourceManager's FileInfo. SourceManager's FileInfo now can report this accessed path, using the new getName method. This API is then adopted in the dependency collector, which now correctly reports dependencies when a file is included both using a symlink and a real path in the case when the FileManager is reused across multiple Preprocessor invocations. Note that this patch does not fix all dependency collector issues, as the same problem is still present in other cases when dependencies are obtained using FileSkipped, InclusionDirective, and HasInclude. This will be fixed in follow-up commits. Differential Revision: https://reviews.llvm.org/D65907 llvm-svn: 369680
OpenPOWER on IntegriCloud