]> granicus.if.org Git - clang/commit
[analyzer] Restrict ObjC type inference to methods that have related result type.
authorAnna Zaks <ganna@apple.com>
Mon, 25 Feb 2013 22:10:34 +0000 (22:10 +0000)
committerAnna Zaks <ganna@apple.com>
Mon, 25 Feb 2013 22:10:34 +0000 (22:10 +0000)
commitdb061e40d639da0d938f915f0eef9e9772019c22
tree3ed41eda7b9adcdcbf7274ee330de4f85fe0a61f
parent6f8e9b6caed0bf6108cf90f0d54fa637b60b3b9e
[analyzer] Restrict ObjC type inference to methods that have related result type.

This addresses a case when we inline a wrong method due to incorrect
dynamic type inference. Specifically, when user code contains a method from init
family, which creates an instance of another class.

Use hasRelatedResultType() to find out if our inference rules should be triggered.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176054 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp
test/Analysis/inlining/ObjCDynTypePopagation.m