[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 3 15:49:26 PST 2018


NoQ updated this revision to Diff 176504.
NoQ marked 4 inline comments as done.
NoQ added a comment.

Address comments!

In D54560#1304155 <https://reviews.llvm.org/D54560#1304155>, @Charusso wrote:

> In D54560#1301870 <https://reviews.llvm.org/D54560#1301870>, @NoQ wrote:
>
> > Write down full messages in tests. When the message was updated from `'x' is moved'` to `Object 'x' is moved`, the tests were not updated because they kept passing because the former is still a sub-string of the latter.
>
>
> It would not be cool to rewrite this `contains` effect to equality like in the regex file-checks? I have ran in the same problem and I was very surprised (for an hour) why my error-dumps does not show up on rewriting bug-report messages.


We already have `// expected-warning-re{{{{^Message$}}}}` for that purpose, it's just annoying to write and is rarely an issue, so nobody uses them until it's absolutely necessary (cf. `test/Analysis/explain-svals.cpp`). Same with `FileCheck` tests.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54560/new/

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.176504.patch
Type: text/x-patch
Size: 23241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181203/209f2ed1/attachment-0001.bin>


More information about the cfe-commits mailing list