41 std::set<const Expr *> UnsafePointers;
43 auto MatchAction = [&UnsafePointers, &Ctx](
const DynTypedNode &Node) {
48 EntityPointerLevelSet Results;
50 for (
const Expr *Ptr : UnsafePointers) {
52 translateEntityPointerLevel(Ptr, Ctx, *
this);
57 auto FilteredTranslation = llvm::make_filter_range(
58 *Translation, [](
const EntityPointerLevel &E) ->
bool {
59 return E.getPointerLevel() > 0;
61 Results.insert(FilteredTranslation.begin(), FilteredTranslation.end());
64 return Translation.takeError();
67 return std::make_unique<UnsafeBufferUsageEntitySummary>(
73 std::vector<const NamedDecl *> Contributors;
76 for (
auto *CD : Contributors) {
82 if ((*EntitySummary)->empty())
90 [[maybe_unused]]
auto [Ignored, InsertionSucceeded] =
93 assert(InsertionSucceeded &&
"duplicated contributor extraction");
Defines the clang::ASTContext interface.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...