We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 211850a commit 265c729Copy full SHA for 265c729
clang/lib/Parse/ParseHLSLRootSignature.cpp
@@ -6,8 +6,6 @@
6
//
7
//===----------------------------------------------------------------------===//
8
9
-#include <float.h>
10
-
11
#include "clang/Parse/ParseHLSLRootSignature.h"
12
13
#include "clang/Lex/LiteralSupport.h"
@@ -969,7 +967,8 @@ std::optional<float> RootSignatureParser::handleFloatLiteral(bool Negated) {
969
967
Val = -Val;
970
968
971
double DoubleVal = Val.convertToDouble();
972
- if (FLT_MAX < DoubleVal || DoubleVal < -FLT_MAX) {
+ double FloatMax = double(std::numeric_limits<float>::max());
+ if (FloatMax < DoubleVal || DoubleVal < -FloatMax) {
973
// Report that the value has overflowed
974
PP.getDiagnostics().Report(CurToken.TokLoc,
975
diag::err_hlsl_number_literal_overflow)
0 commit comments