Update clang/lib/StaticAnalyzer to stop relying on a MemoryBuffer*, using the MemoryBufferRef from getBufferOrNone or the Optional<MemoryBufferRef> from getBufferOrFake, depending on whether there's logic for checking validity of the buffer. The change to clang/lib/StaticAnalyzer/Core/IssueHash.cpp is 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.
Details
Details
Summary
Diff Detail
Diff Detail
Event Timeline
Herald added subscribers: steakhal, ASDenysPetrov, martong and 6 others. · View Herald TranscriptOct 14 2020, 11:11 AM
This revision is now accepted and ready to land.Oct 14 2020, 2:31 PM
dexonsmith removed a child revision: D66782: SourceManager: Prefer Optional<MemoryBufferRef> over MemoryBuffer*.Oct 14 2020, 2:32 PM
dexonsmith added a parent revision: D89394: clang/Basic: Stop using SourceManager::getBuffer, NFC.Oct 14 2020, 2:52 PM
dexonsmith removed a parent revision: D89348: clang/Basic: Replace ContentCache::getBuffer with Optional semantics.Oct 14 2020, 4:25 PM
Closed by commit rGaf4fb416bd35: clang/StaticAnalyzer: Stop using SourceManager::getBuffer (authored by dexonsmith). · Explain WhyOct 14 2020, 9:34 PM
This revision was automatically updated to reflect the committed changes.