[PATCH] D98341: [analyzer][solver] Prevent infeasible states (PR49490)
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 11 02:58:05 PST 2021
steakhal accepted this revision.
steakhal added a comment.
Looks good btw.
================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1400-1406
+ LLVM_ATTRIBUTE_UNUSED inline bool areFeasible(ConstraintRangeTy Constraints) {
+ return llvm::none_of(
+ Constraints,
+ [](const std::pair<EquivalenceClass, RangeSet> ClassConstraint) {
+ return ClassConstraint.second.isEmpty();
+ });
+ }
----------------
`inline` is unnecessary. All member functions are inline by default.
I would take the parameter by `const ref` in the lambda.
Why did you mark it `LLVM_ATTRIBUTE_UNUSED `? `LLVM_NODISCARD` would be probably a better choice.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98341/new/
https://reviews.llvm.org/D98341
More information about the cfe-commits
mailing list