clang 23.0.0git
UnsafeBufferUsageBuilder.h
Go to the documentation of this file.
1//===- UnsafeBufferUsageBuilder.h -------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_ANALYSES_UNSAFEBUFFERUSAGE_UNSAFEBUFFERUSAGEBUILDER_H
10#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_ANALYSES_UNSAFEBUFFERUSAGE_UNSAFEBUFFERUSAGEBUILDER_H
11
14#include <memory>
15
16namespace clang::ssaf {
18public:
20 unsigned PointerLevel) {
21 return {Entity, PointerLevel};
22 }
23
24 static std::unique_ptr<UnsafeBufferUsageEntitySummary>
26 return std::make_unique<UnsafeBufferUsageEntitySummary>(
27 UnsafeBufferUsageEntitySummary(std::move(UnsafeBuffers)));
28 }
29};
30} // namespace clang::ssaf
31
32#endif // LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_ANALYSES_UNSAFEBUFFERUSAGE_UNSAFEBUFFERUSAGEBUILDER_H
Lightweight opaque handle representing an entity in an EntityIdTable.
Definition EntityId.h:31
An EntityPointerLevel represents a level of the declared pointer/array type of an entity.
TUSummaryBuilder(TUSummary &Summary)
An UnsafeBufferUsageEntitySummary is an immutable set of unsafe buffers, in the form of EntityPointer...
static EntityPointerLevel buildEntityPointerLevel(EntityId Entity, unsigned PointerLevel)
static std::unique_ptr< UnsafeBufferUsageEntitySummary > buildUnsafeBufferUsageEntitySummary(EntityPointerLevelSet &&UnsafeBuffers)
std::set< EntityPointerLevel, EntityPointerLevel::Comparator > EntityPointerLevelSet