diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2008-05-01 18:05:01 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-05-01 18:05:01 +0000 |
commit | 3435096781465f6b8e69de4b35d9dd3a94a76468 (patch) | |
tree | deb812226e4d315940452bf492d29acc713f5e2f /lib/Sema/SemaDeclObjC.cpp | |
parent | 24cb8a20ccf9fdd520d2935df3c3ab04476ed4e9 (diff) |
Patch to match and issue diagnostics on property type mismatch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50532 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index da7b1513c8..e95ad6469b 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -286,14 +286,10 @@ Sema::DiagnosePropertyMismatch(ObjCPropertyDecl *Property, Property->getName(), "getter", SuperIDecl->getName(), SourceRange()); - if (Property->getCanonicalType() != SuperProperty->getCanonicalType()) { - if ((CAttr & ObjCPropertyDecl::OBJC_PR_readonly) - && (SAttr & ObjCPropertyDecl::OBJC_PR_readonly)) - // && objc_compare_types(...)) - ; - else - ; // - } + if (Property->getCanonicalType() != SuperProperty->getCanonicalType()) + Diag(Property->getLocation(), diag::warn_property_type, + Property->getType().getAsString(), + SuperIDecl->getName()); } |