[PATCH] D54557: [analyzer] MoveChecker Pt.2: Restrict the warning to STL objects and locals.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 14 18:54:20 PST 2018


NoQ added a comment.

So, like, with locals it should be possible to easily and intuitively suppress the false positive, even if there is one, by simply using an extra variable, and additionally there's the `[[clang::reinitializes]]` attribute added by @xazax.hun that will help people suppress the warning when their object has a popular state-reset method that Static Analyzer doesn't understand. I believe this is a good trade-off between usefulness and usability, given that most positives with locals i've seen so far looked like real bugs.


Repository:
  rC Clang

https://reviews.llvm.org/D54557





More information about the cfe-commits mailing list