================
@@ -233,6 +237,65 @@ class UnsafeBufferReachableAnalysis
updateReachablesWithOutgoings(Node, Worklist);
}
+ }
+
+ /// \return a lazy range over the pointers in \p UnsafePtrs whose entity is
+ /// NOT type-constrained (per \p TypeConstraints).
+ auto filterNonConstrainedPointers(
+ const EntityPointerLevelSet &UnsafePtrs,
+ const TypeConstrainedPointersAnalysisResult &TypeConstraints) {
+ return llvm::make_filter_range(
+ UnsafePtrs, [&TypeConstraints](const EntityPointerLevel &EPL) {
+ return !TypeConstraints.contains(EPL.getEntity());
+ });
----------------
ziqingluo-90 wrote:
good point. I decided to inline these functions.
https://github.com/llvm/llvm-project/pull/209354
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits