summaryrefslogtreecommitdiffstats
path: root/clang/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
commit518e37071916d433aea03a8bd33087fd68abd7e5 (patch)
tree93637d1fa20056dbf64bb6718878b5bd2b84ddb1 /clang/lib/Sema/SemaStmt.cpp
parent1576850a7636fd7b4b77ea31762b58fb140ac969 (diff)
downloadbcm5719-llvm-518e37071916d433aea03a8bd33087fd68abd7e5.tar.gz
bcm5719-llvm-518e37071916d433aea03a8bd33087fd68abd7e5.zip
fix PR4010: add support for the warn_unused_result for function pointers
llvm-svn: 91803
Diffstat (limited to 'clang/lib/Sema/SemaStmt.cpp')
-rw-r--r--clang/lib/Sema/SemaStmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index c2a3a3a8ca6..6a68db75eae 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud