diff options
author | Matt Beaumont-Gay <matthewbg@google.com> | 2011-08-04 23:11:04 +0000 |
---|---|---|
committer | Matt Beaumont-Gay <matthewbg@google.com> | 2011-08-04 23:11:04 +0000 |
commit | 42d7b2d25b6f90dc397886d05502b10ab5a8b51b (patch) | |
tree | 6fc00fa397c623f56a68ed5a13182956d52a6389 /lib/Sema/SemaStmt.cpp | |
parent | 57fb591a54eab7db65d73e77c632f047bca22c54 (diff) |
Specialize diag::warn_unused_call for the "warn_unused_result" attribute, so
it can be controlled with a distinct flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 5825d6b9b6..6b2935fdf7 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/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)) { |