aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-10-15 22:48:14 +0000
committerAnna Zaks <ganna@apple.com>2012-10-15 22:48:14 +0000
commit625ce084bc8de75e74b8920593ab761f20ff5971 (patch)
tree5b23e7d1ec8351e34291ee15b6de1eed863b19d7 /lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
parent7a0c064770355a4918df69f95de8dea6338a59a2 (diff)
[analyzer] Do not warn on direct ivar assignments within copy methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp b/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
index 8646829548..dc90b67e20 100644
--- a/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
+++ b/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
@@ -122,6 +122,8 @@ void DirectIvarAssignment::checkASTDecl(const ObjCImplementationDecl *D,
// initialization based on their name.
if (M->getMethodFamily() == OMF_init ||
M->getMethodFamily() == OMF_dealloc ||
+ M->getMethodFamily() == OMF_copy ||
+ M->getMethodFamily() == OMF_mutableCopy ||
M->getSelector().getNameForSlot(0).find("init") != StringRef::npos ||
M->getSelector().getNameForSlot(0).find("Init") != StringRef::npos)
continue;