================ @@ -46,26 +47,20 @@ bool clang::parseSanitizerWeightedValue(StringRef Value, bool AllowGroups, #include "clang/Basic/Sanitizers.def" .Default(SanitizerMask()); - if (ParsedKind) { - size_t equalsIndex = Value.find_first_of('='); - if (equalsIndex != llvm::StringLiteral::npos) { - double arg; - if ((Value.size() > (equalsIndex + 1)) && - !Value.substr(equalsIndex + 1).getAsDouble(arg)) { - // AllowGroups is already taken into account for ParsedKind, - // hence we unconditionally expandSanitizerGroups. - SanitizerMask ExpandedKind = expandSanitizerGroups(ParsedKind); - - for (unsigned int i = 0; i < SanitizerKind::SO_Count; i++) - if (ExpandedKind & SanitizerMask::bitPosToMask(i)) - Cutoffs[i] = arg; - - return true; - } - } - } - - return false; + if (!ParsedKind) ---------------- thurstond wrote:
Thanks, the tests pass! Should the clamping be moved to `parseNoSanitizeHotArgs`? Hypothetically there could be some future flag, `-fsanitize-something-else=undefined=42,null=56` that could reuse `parseSanitizerWeightedValue` if clamping were not applied in `parseSanitizerWeightedValue`. https://github.com/llvm/llvm-project/pull/121619 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits