[PATCH] D96268: [-Wcompletion-handler] Support checks with builtins
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 8 19:13:04 PST 2021
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
More information about the cfe-commits
mailing list