]> granicus.if.org Git - clang/commit
Sema: Simplify the check if a method returns an instance of the class.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 16 Oct 2013 16:21:04 +0000 (16:21 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 16 Oct 2013 16:21:04 +0000 (16:21 +0000)
commita32966fd8474e7a7002f65d32ace6b7e18dee66b
treea00abac0689a5b7545845280b7ec6187422d725a
parenta48c4a87034a9478b73c25dada9921d1aa16d318
Sema: Simplify the check if a method returns an instance of the class.

Just checking if the parent of the method is the same as the return type
should be sufficient. Also fixes PR17587.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192802 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/SemaCXX/warn-unused-result.cpp