summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-07-01 22:23:09 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-07-01 22:23:09 +0000
commit451ccc08929b3e99235fb2a25cd10935d2c2adec (patch)
treee6336c93c81ee2c7568bd6de082f5feaf6fa8151 /clang/lib
parent9ab661b163feda9ad40d07464a66c1c48360e238 (diff)
downloadbcm5719-llvm-451ccc08929b3e99235fb2a25cd10935d2c2adec.tar.gz
bcm5719-llvm-451ccc08929b3e99235fb2a25cd10935d2c2adec.zip
Fix the warning that is emitted when an ownership attribute is applied incorrectly.
llvm-svn: 134278
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaType.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index cc4389ef15b..cd4a5b50d8b 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -87,6 +87,11 @@ static void diagnoseBadTypeAttribute(Sema &S, const AttributeList &attr,
useInstantiationLoc = true;
break;
+ case AttributeList::AT_objc_ownership:
+ diagID = diag::warn_objc_object_attribute_wrong_type;
+ useInstantiationLoc = true;
+ break;
+
default:
// Assume everything else was a function attribute.
diagID = diag::warn_function_attribute_wrong_type;
OpenPOWER on IntegriCloud