mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
34 lines
1.0 KiB
C++
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
|