[PATCH] D38675: [analyzer] MisusedMovedObjectChecker: Moving the checker out of alpha state

Peter Szecsi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 8 10:01:20 PDT 2017


szepet created this revision.
Herald added subscribers: baloghadamsoftware, whisperity.

First, I am not exactly sure what are the requirements for moving a checker out of alpha. However, the checker seems to work with a low false positive rate. (<15 on the LLVM, 6 effectively different) Also found a true positive (well, it was only example code but still!) which fixes was sent and accepted in patch https://reviews.llvm.org/D32939 .

Is it enough or should I check it on other open source projects? If so, what results are acceptable? ( @NoQ  probably has already used it as well, maybe can have some more comments on the results.)


https://reviews.llvm.org/D38675

Files:
  include/clang/StaticAnalyzer/Checkers/Checkers.td


Index: include/clang/StaticAnalyzer/Checkers/Checkers.td
===================================================================
--- include/clang/StaticAnalyzer/Checkers/Checkers.td
+++ include/clang/StaticAnalyzer/Checkers/Checkers.td
@@ -272,6 +272,11 @@
   HelpText<"Checks C++ copy and move assignment operators for self assignment">,
   DescFile<"CXXSelfAssignmentChecker.cpp">;
 
+def MisusedMovedObjectChecker : Checker<"MisusedMovedObject">,
+  HelpText<"Method calls on a moved-from object and copying a moved-from "
+           "object will be reported">,
+  DescFile<"MisusedMovedObjectChecker.cpp">;
+
 } // end: "cplusplus"
 
 let ParentPackage = CplusplusOptIn in {
@@ -293,11 +298,6 @@
   HelpText<"Check for iterators used outside their valid ranges">,
   DescFile<"IteratorChecker.cpp">;
 
-def MisusedMovedObjectChecker: Checker<"MisusedMovedObject">,
-     HelpText<"Method calls on a moved-from object and copying a moved-from "
-              "object will be reported">,
-     DescFile<"MisusedMovedObjectChecker.cpp">;
-
 } // end: "alpha.cplusplus"
 
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38675.118171.patch
Type: text/x-patch
Size: 1073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171008/06792260/attachment.bin>


More information about the cfe-commits mailing list