[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 14 17:30:49 PST 2018
NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs, Szelethus.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, baloghadamsoftware.
The warning piece traditionally describes the bug itself, i.e., "//The bug is a _____//": "Attempt to delete released memory", "Resource leak", "Method call on a moved-from object".
The "moved-from" terminology we adopt here still feels a bit weird to me, but i don't have a better suggestion, so i just removed the single-quotes so that to at least feel proud about what we have.
Event pieces produced by the visitor are usually in a present tense, i.e., "//At this moment _____//": "Memory is released", "File is closed", "Object is moved", etc.
Additionally, type information is added into the event pieces for STL objects (in order to highlight that it is in fact an STL object), and the respective event piece now mentions that the object is left in an unspecified state after it was moved, which is a vital piece of information to understand the bug.
Repository:
rC Clang
https://reviews.llvm.org/D54560
Files:
lib/StaticAnalyzer/Checkers/MoveChecker.cpp
test/Analysis/use-after-move.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54560.174133.patch
Type: text/x-patch
Size: 22745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181115/ee1726bb/attachment-0001.bin>
More information about the cfe-commits
mailing list