This is an archive of the discontinued LLVM Phabricator instance.

clang/Lex: Stop using SourceManager::getBuffer
ClosedPublic

Authored by dexonsmith on Oct 14 2020, 9:43 AM.

Details

Summary

Update clang/lib/Lex to stop relying on a MemoryBuffer*, using the
MemoryBufferRef from getBufferOrNone since both locations had logic
for checking validity of the buffer. There's potentially a functionality
change, since the logic was wrong (it checked for nullptr, which was
never returned by the old API), but if that was reachable the new
behaviour should be better.

Diff Detail