The code creates a mapping of FilePaths containing the definition of LookupNames. The FilePaths are fetched from a CTU index file at IndexPath. Note, how in the version before CrossTUDir was prepended to the FilePath. In the new version, it doesn't.
That constitutes a problem. The documentation on using CodeChecker to generate a CTU database, gives us an index file with relative paths. If one doesn't append the CTU directory to such a path, the AST file is not going to be found. Which is exactly what happens.
Perhaps, the patch was necessary to support the on-demand CTU analysis, but it seems to have broken the PCH-based one. Or, perhaps, the documentation is outdated.
In 5cc18516c4839fccc64b54eaa5aa447a8e1ed8fa, there is a diff:
The code creates a mapping of
FilePath
s containing the definition ofLookupName
s. TheFilePath
s are fetched from a CTU index file atIndexPath
. Note, how in the version beforeCrossTUDir
was prepended to theFilePath
. In the new version, it doesn't.That constitutes a problem. The documentation on using CodeChecker to generate a CTU database, gives us an index file with relative paths. If one doesn't append the CTU directory to such a path, the AST file is not going to be found. Which is exactly what happens.
Perhaps, the patch was necessary to support the on-demand CTU analysis, but it seems to have broken the PCH-based one. Or, perhaps, the documentation is outdated.
cc @gamesh411.