summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorMatt Beaumont-Gay <matthewbg@google.com>2011-08-04 23:11:04 +0000
committerMatt Beaumont-Gay <matthewbg@google.com>2011-08-04 23:11:04 +0000
commita17cf6330fb75c8f9fff69bb8decfc7f85c2eb4e (patch)
tree11642e23163897410766f698907a8851ecb05917 /clang/lib
parentcd17c12078a68c28023232543499995d6e4b4ae1 (diff)
downloadbcm5719-llvm-a17cf6330fb75c8f9fff69bb8decfc7f85c2eb4e.tar.gz
bcm5719-llvm-a17cf6330fb75c8f9fff69bb8decfc7f85c2eb4e.zip
Specialize diag::warn_unused_call for the "warn_unused_result" attribute, so
it can be controlled with a distinct flag. llvm-svn: 136941
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaStmt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index 5825d6b9b6e..6b2935fdf75 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -123,7 +123,7 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S) {
// a more specific message to make it clear what is happening.
if (const Decl *FD = CE->getCalleeDecl()) {
if (FD->getAttr<WarnUnusedResultAttr>()) {
- Diag(Loc, diag::warn_unused_call) << R1 << R2 << "warn_unused_result";
+ Diag(Loc, diag::warn_unused_result) << R1 << R2;
return;
}
if (FD->getAttr<PureAttr>()) {
@@ -142,7 +142,7 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S) {
}
const ObjCMethodDecl *MD = ME->getMethodDecl();
if (MD && MD->getAttr<WarnUnusedResultAttr>()) {
- Diag(Loc, diag::warn_unused_call) << R1 << R2 << "warn_unused_result";
+ Diag(Loc, diag::warn_unused_result) << R1 << R2;
return;
}
} else if (isa<ObjCPropertyRefExpr>(E)) {
OpenPOWER on IntegriCloud