This is an archive of the discontinued LLVM Phabricator instance.

clang-import-test: Clean up error output for files that cannot be found
ClosedPublic

Authored by dexonsmith on Dec 9 2020, 2:09 PM.

Details

Summary

Pass on the filesystem error string FileManager::getFileRef in
clang-import-test's ParseSource function. Also include "error:" and
a newline in the output. As a side effect, migrate to the FileEntryRef
overload of SourceManager::createFileID.

No real functionality change here, just slightly better output on error.

Diff Detail

Event Timeline

dexonsmith created this revision.Dec 9 2020, 2:09 PM
dexonsmith requested review of this revision.Dec 9 2020, 2:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2020, 2:09 PM

If the error output changes seem imprudent, I'm happy to skip those; the only thing I need here is the migration to the other overload of createFileID (the "side effect"); could just call llvm::consumeError and be done with it.

This revision is now accepted and ready to land.Dec 10 2020, 7:20 AM
This revision was landed with ongoing or failed builds.Dec 11 2020, 5:17 PM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Dec 11 2020, 5:29 PM

This breaks tests on Windows: http://45.33.8.238/win/29686/step_7.txt

PTAL, and please revert for now if it takes a while to fix.

This breaks tests on Windows: http://45.33.8.238/win/29686/step_7.txt

PTAL, and please revert for now if it takes a while to fix.

I'll fix now.

This breaks tests on Windows: http://45.33.8.238/win/29686/step_7.txt

PTAL, and please revert for now if it takes a while to fix.

I'll fix now.

e095959e0c23e250d6ad1dbe3612291736d12e1a makes it not platform-dependent.

Thanks for the quick fix! The bot is happy again.