NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.

Aha, yup, makes sense!



================
Comment at: clang/lib/Analysis/CalledOnceCheck.cpp:343
+    case Builtin::BI__builtin_expect_with_probability: {
+      assert(CE->getNumArgs() >= 2);
+
----------------
Otherwise it's a compile error and analysis based warnings aren't run when 
there are compile errors, right? If it was a normal function call there's no 
way we would have gotten away with such assertion. Like, even if it was a 
standard library function the user could still override that. But for builtins 
I guess that should work.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96268/new/

https://reviews.llvm.org/D96268

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to