Files
swift-mirror/include/swift/AST/SourceFileExtras.h
Hamish Knight 45683f6561 [Sema] Exclude private initialized vars from memberwise initializer
Exclude properties with initial values from the memberwise initializer
if they are less accessible than the most accessible property, up to
`internal`. Introduce a compatibility overload that continues to
include the same properties as before until the next language mode.

This is gated behind the `ExcludePrivateFromMemberwiseInit` feature.

rdar://122416579
2025-12-08 23:22:35 +00:00

34 lines
1.0 KiB
C++

//===--- SourceFileExtras.h - Extra data for a source file ------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2019 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_SOURCEFILEEXTRAS_H
#define SWIFT_AST_SOURCEFILEEXTRAS_H
#include "llvm/ADT/DenseMap.h"
#include <vector>
namespace swift {
class Decl;
/// Extra information associated with a source file that is lazily created and
/// stored in a separately-allocated side structure.
struct SourceFileExtras {
/// Set of compatibility memberwise initializers that we have emitted a
/// warning for.
llvm::DenseSet<const ConstructorDecl *> DiagnosedCompatMemberwiseInits;
};
}
#endif // SWIFT_AST_SOURCEFILEEXTRAS_H