[PATCH] D89414: clang/StaticAnalyzer: Stop using SourceManager::getBuffer
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 11:11:30 PDT 2020
dexonsmith created this revision.
dexonsmith added a reviewer: arphaman.
Herald added subscribers: steakhal, ASDenysPetrov, martong, ributzka, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware.
dexonsmith requested review of this revision.
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.
https://reviews.llvm.org/D89414
Files:
clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
clang/lib/StaticAnalyzer/Core/BugReporter.cpp
clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
clang/lib/StaticAnalyzer/Core/IssueHash.cpp
clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp
clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89414.298193.patch
Type: text/x-patch
Size: 5848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201014/a09788c6/attachment.bin>
More information about the cfe-commits
mailing list