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#ifndef LLVM_CLANG_ANALYSIS_SCALABLE_ANALYSES_UNSAFEBUFFERUSAGE_UNSAFEBUFFERUSAGEBUILDER_H
9#define LLVM_CLANG_ANALYSIS_SCALABLE_ANALYSES_UNSAFEBUFFERUSAGE_UNSAFEBUFFERUSAGEBUILDER_H
10
13#include <memory>
14
15namespace clang::ssaf {
17public:
19 unsigned PointerLevel) {
20 return {Entity, PointerLevel};
21 }
22
23 static std::unique_ptr<UnsafeBufferUsageEntitySummary>
25 return std::make_unique<UnsafeBufferUsageEntitySummary>(
26 UnsafeBufferUsageEntitySummary(std::move(UnsafeBuffers)));
27 }
28};
29} // namespace clang::ssaf
30
31#endif // LLVM_CLANG_ANALYSIS_SCALABLE_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