Files
swift-mirror/include/swift/AST/Concurrency.h
Michael Gottesman bbc4816861 [sema] Move getConcurrencyDiagnosticBehaviorLimit and hasExplicitSendableConformance out of Sema and into libAST.
I am going to expose this on TypeBase, so I am attempting to prevent a layering
violation in between AST and Sema.
2024-08-23 20:42:51 -04:00

38 lines
1.3 KiB
C++

//===--- Concurrency.h ----------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_AST_CONCURRENCY_H
#define SWIFT_AST_CONCURRENCY_H
#include "swift/AST/DiagnosticEngine.h"
#include <optional>
namespace swift {
/// Determinate the appropriate diagnostic behavior to used when emitting
/// concurrency diagnostics when referencing the given nominal type from the
/// given declaration context.
std::optional<DiagnosticBehavior>
getConcurrencyDiagnosticBehaviorLimit(NominalTypeDecl *nominal,
const DeclContext *fromDC,
bool ignoreExplicitConformance = false);
/// Determine whether the given nominal type has an explicit Sendable
/// conformance (regardless of its availability).
bool hasExplicitSendableConformance(NominalTypeDecl *nominal,
bool applyModuleDefault = true);
} // namespace swift
#endif