Skip to content

Commit 1aed608

Browse files
committed
Fix clamp for double
1 parent f27eb85 commit 1aed608

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Basic/Sanitizers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ bool clang::parseSanitizerWeightedValue(StringRef Value, bool AllowGroups,
7575
double A;
7676
if (W.getAsDouble(A))
7777
return false;
78-
float C = std::clamp(A, 0.0, 1.0);
78+
A = std::clamp(A, 0.0, 1.0);
7979
// AllowGroups is already taken into account for ParsedKind,
8080
// hence we unconditionally expandSanitizerGroups.
81-
Cutoffs.set(expandSanitizerGroups(ParsedKind), C);
81+
Cutoffs.set(expandSanitizerGroups(ParsedKind), A);
8282
return true;
8383
}
8484

0 commit comments

Comments
 (0)