aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-15 18:47:04 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-15 18:47:04 +0000
commit35e12c90c1b107a75c5615aa76fdbd403661aaa6 (patch)
treefce436c91a034af8014797d24ead6fabd1a2fe83 /lib/Sema/SemaStmt.cpp
parent928d69f2927c32e2f57a882a96c2bef1de79aa4b (diff)
Make the "unused result" warning a warning about run-time behavior, so
that we don't warn when there isn't going to be any computation anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108442 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 9c8f48bfea..075f662824 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -141,7 +141,7 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S) {
}
}
- Diag(Loc, DiagID) << R1 << R2;
+ DiagRuntimeBehavior(Loc, PDiag(DiagID) << R1 << R2);
}
Action::OwningStmtResult