summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-02-23 01:52:04 +0000
committerTed Kremenek <kremenek@apple.com>2011-02-23 01:52:04 +0000
commit3427fac7c883efbb1097ac9ba13198b95c9fbccb (patch)
tree90b45ab6b5b03a98eef401300c9b0d989f6252b8 /clang/lib/Sema/SemaStmt.cpp
parent80861ca9b53545dd1579a9853807e780952a55da (diff)
downloadbcm5719-llvm-3427fac7c883efbb1097ac9ba13198b95c9fbccb.tar.gz
bcm5719-llvm-3427fac7c883efbb1097ac9ba13198b95c9fbccb.zip
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. llvm-svn: 126290
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 94ba93d5c22..0abd79a696f 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud