This is an archive of the discontinued LLVM Phabricator instance.

clang-{tools,unittests}: Stop using SourceManager::getBuffer, NFC
ClosedPublic

Authored by dexonsmith on Oct 14 2020, 11:42 AM.

Details

Summary

Update clang-tools-extra, clang/tools, clang/unittests to migrate from
SourceManager::getBuffer, which returns an always dereferenceable
MemoryBuffer*, to getBufferOrNone or getBufferOrFake, both of
which return a MemoryBufferRef, depending on whether the call site was
checking for validity of the buffer. No functionality change intended.

Diff Detail

Event Timeline

dexonsmith created this revision.Oct 14 2020, 11:42 AM

Removed the now-unused Invalid local variable from the libclang change; not sure how I missed the warning before.

arphaman accepted this revision.Oct 14 2020, 6:35 PM
This revision is now accepted and ready to land.Oct 14 2020, 6:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2020, 10:01 PM