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
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 74ecf5f..f8ab8a6 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -9673,7 +9673,8 @@
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) {