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"
 
 


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"
 
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to