================
@@ -96,6 +96,8 @@ void TimeSubtractionCheck::registerMatchers(MatchFinder
*Finder) {
const std::string TimeInverse = (llvm::Twine("ToUnix") + ScaleName).str();
std::optional<DurationScale> Scale = getScaleForTimeInverse(TimeInverse);
assert(Scale && "Unknown scale encountered");
+ if (!Scale)
+ continue;
----------------
vbvictor wrote:
Can we then remove first `assert` if we still check via `if` later? (but
preserve comment)
https://github.com/llvm/llvm-project/pull/170004
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits