summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2018-05-14 23:21:48 +0000
committerRichard Trieu <rtrieu@google.com>2018-05-14 23:21:48 +0000
commita2b8fe660404a9594363e7b9721c1df4f27fd500 (patch)
tree6aebb6c8006161162f728dba0776fadd879bc9ca /clang/lib/Sema/SemaChecking.cpp
parent9ae56b9a0e2f9769eddcbfb16feff28fce773edb (diff)
downloadbcm5719-llvm-a2b8fe660404a9594363e7b9721c1df4f27fd500.tar.gz
bcm5719-llvm-a2b8fe660404a9594363e7b9721c1df4f27fd500.zip
Enable control flow pruning of float overflow warnings.
Like other conversion warnings, allow float overflow warnings to be disabled in known dead paths of template instantiation. This often occurs when a template template type is a numeric type and the template will check the range of the numeric type before performing the conversion. llvm-svn: 332310
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 74ecf5fef79..f8ab8a6b385 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -9673,7 +9673,8 @@ static void DiagnoseFloatingImpCast(Sema &S, Expr *E, QualType T,
return DiagnoseImpCast(
S, E, T, CContext,
IsLiteral ? diag::warn_impcast_literal_float_to_integer_out_of_range
- : diag::warn_impcast_float_to_integer_out_of_range);
+ : diag::warn_impcast_float_to_integer_out_of_range,
+ PruneWarnings);
unsigned DiagID = 0;
if (IsLiteral) {
OpenPOWER on IntegriCloud