================
@@ -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:

It feels weird that dataflow framework didn't count it as "validation", could 
it be a FP?
Later, you used `assert(BestConversion && "text");` for the same purpose of 
validation

https://github.com/llvm/llvm-project/pull/170004
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to