While looking at this code I found a couple of places where errors could
get ignored or silently discarded and result in corrupt data. This
checks for the errors and fails harder.
Depends on D10353
Differential Revision: https://phabricator.services.mozilla.com/D10354
--HG--
extra : moz-landing-system : lando
This is necessary because:
(a) the JSONFormatter emits a \n newline for each analysis line
(b) we truncate the file to the expected length after writing it
(c) on Windows writing the file in text mode replaces \n with \r\n
and invalidates our computed "expected length"
Differential Revision: https://phabricator.services.mozilla.com/D10353
--HG--
extra : moz-landing-system : lando
Also work around https://bugs.llvm.org/show_bug.cgi?id=37746 by
explicitly handling ObjC interface variables separately. This actually
allows the searchfox macosx build to go much further than it used to (it
now fails during make package with apparently no output for rust code)
--HG--
extra : rebase_source : 354981ca9deebed5c60d3684f5c3abc554422393
In some cases we have SourceLocation objections that are isMacroId()
rather than isFileId() and so don't have a filename at all. In other
cases the filename is something clang-internal like "<scratch>". In
both of these situations we don't want to output any analysis data.
However, the code previously was taking the empty filename and resolving
it relative to the source folder, and then tried to write to the
source folder or create a file corresponding to a subfolder. This
resulted in general badness. This patch makes sure we ignore analysis
from places that don't have a corresponding file so that we don't
have this problem.
MozReview-Commit-ID: 7WluygY9Uy8
--HG--
extra : rebase_source : 35d7e71fc05bbd5a3357a57db9de25782178622a
This adds an RAII class and macro that can be quickly added in functions
to log entry/exit from the function. This is useful to debugging.
MozReview-Commit-ID: 4Ud8jLOxI0R
--HG--
extra : rebase_source : 518d30fe44dff67bffb186e23c1eb858c02280af
The indexer has paths handed to it on Windows with the backslash path separator.
However it currently hard-codes the forward-slash Unix/macOS path separator,
so we need to generify that code appropriately.
MozReview-Commit-ID: Iy8bImt2BXW
--HG--
extra : rebase_source : 4b88b44319c05ce816afc4e690d3d33d39b7e43c
This change was made in the mozsearch/mozsearch repo at some point and wasn't
synced to m-c.
MozReview-Commit-ID: HnW80AIrGt7
--HG--
extra : rebase_source : f621d89cb712ac5c13e7636cf2d9d7222a6f422b
This is an import of the change from https://github.com/mozsearch/mozsearch/pull/66
plus a correction in the README file. The change was reviewed in github.
MozReview-Commit-ID: A7gINlBubZ4