aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/Checkers.td
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-12-08 08:31:14 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-12-08 08:31:14 +0000
commitdc30967a4633186782e0e204c65dba2552301ec9 (patch)
tree3cf88e20ef0271a4fb26a841b06b126619706f31 /lib/StaticAnalyzer/Checkers/Checkers.td
parent2e55df49929a515b05f3af89b47a13357eccd9d0 (diff)
Add an experimental MallocSizeofChecker, which reports inconsistencies
between the casted type of the return value of a malloc/calloc/realloc call and the operand of any sizeof expressions contained within its argument(s). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/Checkers.td')
-rw-r--r--lib/StaticAnalyzer/Checkers/Checkers.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Checkers/Checkers.td b/lib/StaticAnalyzer/Checkers/Checkers.td
index 2e763f6032..4b8da086d6 100644
--- a/lib/StaticAnalyzer/Checkers/Checkers.td
+++ b/lib/StaticAnalyzer/Checkers/Checkers.td
@@ -256,6 +256,10 @@ def MallocChecker : Checker<"Malloc">,
HelpText<"Check for potential memory leaks, double free, and use-after-free problems">,
DescFile<"MallocChecker.cpp">;
+def MallocSizeofChecker : Checker<"MallocSizeof">,
+ HelpText<"Check for dubious malloc arguments involving sizeof">,
+ DescFile<"MallocSizeofChecker.cpp">;
+
def PthreadLockChecker : Checker<"PthreadLock">,
HelpText<"Simple lock -> unlock checker">,
DescFile<"PthreadLockChecker.cpp">;