aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-21 05:15:32 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-21 05:15:32 +0000
commit48108fdb9c3bcffe5bccd88a1a91353a4df71629 (patch)
tree76568ac854033c12e6c89b15257f3a0f796661c4 /lib/Sema/SemaDeclAttr.cpp
parent240670c8f88a0062a76c2f15431341dd0406692f (diff)
Clang really intends to reject attribute 'warn_unused_result' on Objective-C methods, but
instead it crashes on them. We might extend this attribute to work on methods, but for now fix the crasher. Addresses <rdar://problem/7670939>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96723 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--lib/Sema/SemaDeclAttr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index ef82d53b5c..8178a14751 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -754,7 +754,7 @@ static void HandleWarnUnusedResult(Decl *D, const AttributeList &Attr, Sema &S)
return;
}
- if (!isFunctionOrMethod(D)) {
+ if (!isFunction(D)) {
S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
<< Attr.getName() << 0 /*function*/;
return;