NoQ created this revision.
NoQ added a reviewer: dcoughlin.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus,
mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.
Herald added a project: clang.
NoQ added a comment.
The TODOs for future polishing are:
- Add a second `trackExpressionValue()` visitor to track argument values as
they're copied around.
- Introduce annotations for deallocator functions so that we no longer had to
hardcode them and users could annotate their consuming functions.
The checker has already proven to be fairly useful and wanted and doesn't have
any known false positives, mostly because its positives are usually fairly
local and there's no room for running into infeasible paths.
Repository:
rC Clang
https://reviews.llvm.org/D58529
Files:
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
clang/test/Analysis/mig.mm
Index: clang/test/Analysis/mig.mm
===================================================================
--- clang/test/Analysis/mig.mm
+++ clang/test/Analysis/mig.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,alpha.osx.MIG\
+// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,osx.MIG\
// RUN: -analyzer-output=text -fblocks -verify %s
typedef unsigned uint32_t;
Index: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
===================================================================
--- clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+++ clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
@@ -703,6 +703,11 @@
HelpText<"Check for proper uses of Secure Keychain APIs">,
Documentation<HasDocumentation>;
+def MIGChecker : Checker<"MIG">,
+ HelpText<"Find violations of the Mach Interface Generator "
+ "calling convention">,
+ Documentation<NotDocumented>;
+
def ObjCPropertyChecker : Checker<"ObjCProperty">,
HelpText<"Check for proper uses of Objective-C properties">,
Documentation<NotDocumented>;
@@ -811,15 +816,6 @@
Documentation<NotDocumented>;
} // end "optin.performance"
-let ParentPackage = OSXAlpha in {
-
-def MIGChecker : Checker<"MIG">,
- HelpText<"Find violations of the Mach Interface Generator "
- "calling convention">,
- Documentation<NotDocumented>;
-
-} // end "alpha.osx"
-
let ParentPackage = CocoaAlpha in {
def IvarInvalidationModeling : Checker<"IvarInvalidationModeling">,
Index: clang/test/Analysis/mig.mm
===================================================================
--- clang/test/Analysis/mig.mm
+++ clang/test/Analysis/mig.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,alpha.osx.MIG\
+// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,osx.MIG\
// RUN: -analyzer-output=text -fblocks -verify %s
typedef unsigned uint32_t;
Index: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
===================================================================
--- clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+++ clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
@@ -703,6 +703,11 @@
HelpText<"Check for proper uses of Secure Keychain APIs">,
Documentation<HasDocumentation>;
+def MIGChecker : Checker<"MIG">,
+ HelpText<"Find violations of the Mach Interface Generator "
+ "calling convention">,
+ Documentation<NotDocumented>;
+
def ObjCPropertyChecker : Checker<"ObjCProperty">,
HelpText<"Check for proper uses of Objective-C properties">,
Documentation<NotDocumented>;
@@ -811,15 +816,6 @@
Documentation<NotDocumented>;
} // end "optin.performance"
-let ParentPackage = OSXAlpha in {
-
-def MIGChecker : Checker<"MIG">,
- HelpText<"Find violations of the Mach Interface Generator "
- "calling convention">,
- Documentation<NotDocumented>;
-
-} // end "alpha.osx"
-
let ParentPackage = CocoaAlpha in {
def IvarInvalidationModeling : Checker<"IvarInvalidationModeling">,
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits