aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2009-12-20 23:11:08 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2009-12-20 23:11:08 +0000
commitd20254f2875d0004c57ee766f258dbcee29f4841 (patch)
tree6c4ddb716d8e6c7712ad5874c261306c448f09f6 /lib/Sema/SemaStmt.cpp
parent6405646cb649e4b4c6768b92d1fc83c175722f62 (diff)
fix PR4010: add support for the warn_unused_result for function pointers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index c2a3a3a8ca..6a68db75ea 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -96,7 +96,7 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S) {
if (const CallExpr *CE = dyn_cast<CallExpr>(E)) {
// If the callee has attribute pure, const, or warn_unused_result, warn with
// a more specific message to make it clear what is happening.
- if (const FunctionDecl *FD = CE->getDirectCallee()) {
+ if (const Decl *FD = CE->getCalleeDecl()) {
if (FD->getAttr<WarnUnusedResultAttr>()) {
Diag(Loc, diag::warn_unused_call) << R1 << R2 << "warn_unused_result";
return;