diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-02-23 01:52:04 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-02-23 01:52:04 +0000 |
commit | 351ba91eaa6d30e523587b2d7ed676a5172c6e56 (patch) | |
tree | bab3939265bf7b3e8e922f978c9ac49701f7853e /lib/Sema/SemaStmt.cpp | |
parent | 42461eecee98fff3671b3c14ce10f1a9e18cc95c (diff) |
Enhance Sema::DiagRuntimeBehavior() to delay some diagnostics to see if the related code is reachable. This suppresses some
diagnostics that occur in unreachable code (e.g., -Warray-bound).
We only pay the cost of doing the reachability analysis when we issue one of these diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 94ba93d5c2..0abd79a696 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -146,7 +146,7 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S) { } } - DiagRuntimeBehavior(Loc, S, PDiag(DiagID) << R1 << R2); + DiagRuntimeBehavior(Loc, 0, PDiag(DiagID) << R1 << R2); } StmtResult |