Skip to content

Gardening: Migrate compiler sources to GitHub issues #61347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# Swift's libraries all build after the LLVM & Clang tablegen-generated headers
# are generated. When building out-of-tree (as with build-script) LLVM & Clang's
# CMake configuration files create these targets as dummies so we can safely
# depend on them directly here (See: SR-6026)
# depend on them directly here.
# See https://github.com/apple/swift/issues/48583.
#
# LLVM_COMMON_DEPENDS is a construct from the LLVM build system. It is a special
# purpose variable that provides common dependencies for all libraries, and
# executables generated when it is set. CMake's scoping rules enforce that these
Expand Down
2 changes: 1 addition & 1 deletion lib/ClangImporter/ClangImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3125,7 +3125,7 @@ class VectorDeclPtrConsumer : public swift::VisibleDeclConsumer {
};
} // unnamed namespace

// FIXME: should submodules still be crawled for the symbol graph? (SR-15753)
// FIXME(https://github.com/apple/swift-docc/issues/190): Should submodules still be crawled for the symbol graph?
bool ClangModuleUnit::shouldCollectDisplayDecls() const { return isTopLevel(); }

void ClangModuleUnit::getTopLevelDecls(SmallVectorImpl<Decl*> &results) const {
Expand Down
8 changes: 3 additions & 5 deletions lib/ClangImporter/ImportDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ namespace {
return nullptr;
}

// TODO(SR-13809): fix this once we support dependent types.
// TODO(https://github.com/apple/swift/issues/56206): Fix this once we support dependent types.
if (decl->getTypeForDecl()->isDependentType()) {
Impl.addImportDiagnostic(
decl, Diagnostic(
Expand Down Expand Up @@ -3006,8 +3006,7 @@ namespace {

auto templateParamTypeUsedInSignature =
[decl](clang::TemplateTypeParmDecl *type) -> bool {
// TODO(SR-13809): we will want to update this to handle dependent
// types when those are supported.
// TODO(https://github.com/apple/swift/issues/56206): We will want to update this to handle dependent types when those are supported.
if (hasSameUnderlyingType(decl->getReturnType().getTypePtr(), type))
return true;

Expand Down Expand Up @@ -3038,8 +3037,7 @@ namespace {
//
// If the defaulted template type parameter is used in the signature,
// then still add a generic so that it can be overrieded.
// TODO(SR-14837): in the future we might want to import two overloads
// in this case so that the default type could still be used.
// TODO(https://github.com/apple/swift/issues/57184): In the future we might want to import two overloads in this case so that the default type could still be used.
if (templateTypeParam->hasDefaultArgument() &&
!templateParamTypeUsedInSignature(templateTypeParam))
continue;
Expand Down
11 changes: 5 additions & 6 deletions lib/ClangImporter/ImportMacro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ static ValueDecl *importMacro(ClangImporter::Implementation &impl,
tokenI[2].is(clang::tok::r_paren)) {
if (!castType.isNull()) {
// this is a nested cast
// TODO(SR-15429): Diagnose nested cast
// TODO(https://github.com/apple/swift/issues/57735): Diagnose nested cast.
return nullptr;
}

Expand All @@ -428,11 +428,11 @@ static ValueDecl *importMacro(ClangImporter::Implementation &impl,
if (parsedType && diagPool.empty()) {
castType = parsedType.get();
} else {
// TODO(SR-15429): Add diagnosis
// TODO(https://github.com/apple/swift/issues/57735): Add diagnosis.
return nullptr;
}
if (!castType->isBuiltinType() && !castTypeIsId) {
// TODO(SR-15429): Add diagnosis
// TODO(https://github.com/apple/swift/issues/57735): Add diagnosis.
return nullptr;
}
} else {
Expand All @@ -441,7 +441,7 @@ static ValueDecl *importMacro(ClangImporter::Implementation &impl,
if (builtinType) {
castType = builtinType.getValue();
} else {
// TODO(SR-15429): Add diagnosis
// TODO(https://github.com/apple/swift/issues/57735): Add diagnosis.
return nullptr;
}
}
Expand Down Expand Up @@ -499,8 +499,7 @@ static ValueDecl *importMacro(ClangImporter::Implementation &impl,
// FIXME: If the identifier refers to a declaration, alias it?
}

// TODO(SR-15429): Seems rare to have a single token that is neither a
// literal nor an identifier, but add diagnosis
// TODO(https://github.com/apple/swift/issues/57735): Seems rare to have a single token that is neither a literal nor an identifier, but add diagnosis.
return nullptr;
}
case 2: {
Expand Down
11 changes: 5 additions & 6 deletions lib/ClangImporter/ImportType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ namespace {

ImportResult VisitType(const Type*) = delete;

// TODO: Add support for dependent types (SR-13809).
// TODO(https://github.com/apple/swift/issues/56206): Add support for dependent types.
#define DEPENDENT_TYPE(Class, Base) \
ImportResult Visit##Class##Type(const clang::Class##Type *) { return Impl.SwiftContext.getAnyExistentialType(); }
#define TYPE(Class, Base)
Expand Down Expand Up @@ -697,10 +697,9 @@ namespace {
if (!swiftParamTy)
return Type();

// FIXME: If we were walking TypeLocs, we could actually get parameter
// names. The probably doesn't matter outside of a FuncDecl, which
// we'll have to special-case, but it's an interesting bit of data loss.
// <https://bugs.swift.org/browse/SR-2529>
// FIXME(https://github.com/apple/swift/issues/45134): If we were walking TypeLocs, we could actually get parameter names.
// The probably doesn't matter outside of a FuncDecl, which we'll have
// to special-case, but it's an interesting bit of data loss.
params.push_back(FunctionType::Param(swiftParamTy));
}

Expand Down Expand Up @@ -2446,7 +2445,7 @@ ParameterList *ClangImporter::Implementation::importFunctionParameterList(
bool shouldCheckResultType) -> bool {
auto paramDecl = genericParam->getClangDecl();
auto templateTypeParam = cast<clang::TemplateTypeParmDecl>(paramDecl);
// TODO(SR-13809): This won't work when we support importing dependent types.
// TODO(https://github.com/apple/swift/issues/56206): This won't work when we support importing dependent types.
// We'll have to change this logic to traverse the type tree of the imported
// Swift type (basically whatever ends up in the parameters variable).
// Check if genericParam's corresponding clang template type is used by
Expand Down
9 changes: 5 additions & 4 deletions lib/Driver/DarwinToolChains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,11 @@ toolchains::Darwin::addArgsToLinkStdlib(ArgStringList &Arguments,
// If the user has explicitly asked for a toolchain stdlib, we should
// provide one using -rpath. This used to be the default behaviour but it
// was considered annoying in at least the SwiftPM scenario (see
// https://bugs.swift.org/browse/SR-1967) and is obsolete in all scenarios
// of deploying for Swift-in-the-OS. We keep it here as an optional
// behaviour so that people downloading snapshot toolchains for testing new
// stdlibs will be able to link to the stdlib bundled in that toolchain.
// https://github.com/apple/swift/issues/44576) and is obsolete in all
// scenarios of deploying for Swift-in-the-OS. We keep it here as an
// optional behaviour so that people downloading snapshot toolchains for
// testing new stdlibs will be able to link to the stdlib bundled in
// that toolchain.
for (auto path : RuntimeLibPaths) {
Arguments.push_back("-rpath");
Arguments.push_back(context.Args.MakeArgString(path));
Expand Down
2 changes: 1 addition & 1 deletion lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2391,7 +2391,7 @@ bool Driver::handleImmediateArgs(const ArgList &Args, const ToolChain &TC) {

std::string executable = getSwiftProgramPath();

// FIXME: This bypasses mechanisms like -v and -###. (SR-12119)
// FIXME(https://github.com/apple/swift/issues/54554): This bypasses mechanisms like -v and -###.
sys::TaskQueue queue;
queue.addTask(executable.c_str(), commandLine);
queue.execute(nullptr,
Expand Down
2 changes: 1 addition & 1 deletion lib/Frontend/ModuleInterfaceSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ llvm::Regex swift::getSwiftInterfaceCompilerVersionRegex() {
": (.+)$", llvm::Regex::Newline);
}

// MARK: Module name shadowing warnings (SR-898)
// MARK(https://github.com/apple/swift/issues/43510): Module name shadowing warnings
//
// When swiftc emits a module interface, it qualifies most types with their
// module name. This usually makes the interface less ambiguous, but if a type
Expand Down
4 changes: 2 additions & 2 deletions lib/FrontendTool/FrontendTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2276,8 +2276,8 @@ int swift::performFrontend(ArrayRef<const char *> Args,
// diagnostics emitted above, within CompilerInvocation::parseArgs, are never
// serialized. This is a non-issue because, in nearly all cases, frontend
// arguments are generated by the driver, not directly by a user. The driver
// is responsible for emitting diagnostics for its own errors. See SR-2683
// for details.
// is responsible for emitting diagnostics for its own errors.
// See https://github.com/apple/swift/issues/45288 for details.
std::unique_ptr<DiagnosticConsumer> SerializedConsumerDispatcher =
createSerializedDiagnosticConsumerIfNeeded(
Invocation.getFrontendOptions().InputsAndOutputs);
Expand Down
3 changes: 1 addition & 2 deletions lib/FrontendTool/LoadedModuleTrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ class ABIDependencyEvaluator {

/// Check if a Swift module is an overlay for some Clang module.
///
/// FIXME: Delete this hack once SR-13363 is fixed and ModuleDecl has the
/// right API which we can use directly.
/// FIXME: Delete this hack once https://github.com/apple/swift/issues/55804 is fixed and ModuleDecl has the right API which we can use directly.
bool isOverlayOfClangModule(ModuleDecl *swiftModule);

/// Check for cases where we have a fake cycle through an overlay.
Expand Down
3 changes: 2 additions & 1 deletion lib/FrontendTool/TBD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ bool swift::writeTBD(ModuleDecl *M, StringRef OutputFilename,
static bool isSymbolIgnored(const StringRef& name,
const llvm::Module &IRModule) {
if (llvm::Triple(IRModule.getTargetTriple()).isOSWindows()) {
// (SR-15938) Error when referencing #dsohandle in a Swift test on Windows
// https://github.com/apple/swift/issues/58199
// Error when referencing #dsohandle in a Swift test on Windows.
// On Windows, ignore the lack of __ImageBase in the TBD file.
if (name == "__ImageBase") {
return true;
Expand Down
2 changes: 1 addition & 1 deletion lib/IDE/SourceEntityWalker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ SemaAnnotator::walkToArgumentListPre(ArgumentList *ArgList) {
if (ArgList->isImplicit())
return Action::Continue(ArgList);

// FIXME: What about SubscriptExpr and KeyPathExpr arg labels? (SR-15063)
// FIXME(https://github.com/apple/swift/issues/57390): What about SubscriptExpr and KeyPathExpr arg labels?
if (auto CallE = dyn_cast_or_null<CallExpr>(Parent.getAsExpr())) {
if (!passCallArgNames(CallE->getFn(), ArgList))
return doStopTraversal();
Expand Down
4 changes: 2 additions & 2 deletions lib/IRGen/IRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ swift::getIRTargetOptions(const IRGenOptions &Opts, ASTContext &Ctx) {

auto *Clang = static_cast<ClangImporter *>(Ctx.getClangModuleLoader());

// WebAssembly doesn't support atomics yet, see https://bugs.swift.org/browse/SR-12097
// for more details.
// WebAssembly doesn't support atomics yet, see
// https://github.com/apple/swift/issues/54533 for more details.
if (Clang->getTargetInfo().getTriple().isOSBinFormatWasm())
TargetOpts.ThreadModel = llvm::ThreadModel::Single;

Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/IRGenDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
Mangle::ASTMangler Mangler;
std::string Result = Mangler.mangleTypeForDebugger(Ty, Sig);

// TODO(SR-15377): We currently cannot round trip some C++ types.
// TODO(https://github.com/apple/swift/issues/57699): We currently cannot round trip some C++ types.
if (!Opts.DisableRoundTripDebugTypes &&
!Ty->getASTContext().LangOpts.EnableCXXInterop) {
// Make sure we can reconstruct mangled types for the debugger.
Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/Lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ static bool maybeConsumeNewlineEscape(const char *&CurPtr, ssize_t Offset) {
static bool diagnoseZeroWidthMatchAndAdvance(char Target, const char *&CurPtr,
DiagnosticEngine *Diags) {
// TODO: Detect, diagnose and skip over zero-width characters if required.
// See https://bugs.swift.org/browse/SR-8678 for possible implementation.
// See https://github.com/apple/swift/issues/51192 for possible implementation.
return *CurPtr == Target && CurPtr++;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/ParseDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7343,7 +7343,7 @@ Parser::parseDeclVar(ParseDeclOptions Flags,
// Skip parsing the var-get-set clause if '{' is at start of line
// and next token is not 'didSet' or 'willSet'. Parsing as 'do'
// statement gives useful errors for missing 'do' before brace.
// See SR-14836.
// See https://github.com/apple/swift/issues/57183.
if (!PatternInit || !Tok.isAtStartOfLine() || isStartOfGetSetAccessor()) {
HasAccessors = true;
auto boundVar = parseDeclVarGetSet(
Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/ParseExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ static MagicIdentifierLiteralExpr::Kind
getMagicIdentifierLiteralKind(tok Kind, const LangOptions &Opts) {
switch (Kind) {
case tok::pound_file:
// TODO: Enable by default at the next source break. (SR-13199)
// TODO(https://github.com/apple/swift/issues/55639): Enable by default at the next source break.
return Opts.hasFeature(Feature::ConciseMagicFile)
? MagicIdentifierLiteralExpr::FileIDSpelledAsFile
: MagicIdentifierLiteralExpr::FilePathSpelledAsFile;
Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/ParsePattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ Parser::parseParameterClause(SourceLoc &leftParenLoc,
// warn about the misuse of this syntax and offer to
// fix it.
// An exception to this rule is when the type is declared with type sugar
// Reference: SR-11724
// Reference: https://github.com/apple/swift/issues/54133
if (isa<OptionalTypeRepr>(param.Type)
|| isa<ImplicitlyUnwrappedOptionalTypeRepr>(param.Type)) {
diagnose(typeStartLoc, diag::parameter_unnamed)
Expand Down
2 changes: 1 addition & 1 deletion lib/SIL/IR/SILDeclRef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ std::string SILDeclRef::mangle(ManglingKind MKind) const {
}

// Returns true if the given JVP/VJP SILDeclRef requires a new vtable entry.
// FIXME(SR-14131): Also consider derived declaration `@derivative` attributes.
// FIXME(https://github.com/apple/swift/issues/54833): Also consider derived declaration `@derivative` attributes.
static bool derivativeFunctionRequiresNewVTableEntry(SILDeclRef declRef) {
assert(declRef.getDerivativeFunctionIdentifier() &&
"Expected a derivative function SILDeclRef");
Expand Down
16 changes: 6 additions & 10 deletions lib/SIL/IR/ValueOwnership.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,12 @@ CONSTANT_OR_NONE_OWNERSHIP_INST(Owned, MarkUninitialized)
// be compatible so that TBAA doesn't allow the destroy to be hoisted above uses
// of the cast, or the programmer must use Builtin.fixLifetime.
//
// FIXME
// -----
//
// SR-7175: Since we model this as unowned, then we must copy the
// value before use. This directly contradicts the semantics mentioned
// above since we will copy the value upon any use lest we use an
// unowned value in an owned or guaranteed way. So really all we will
// do here is perhaps add a copy slightly earlier unless the unowned
// value immediately is cast to something trivial. In such a case, we
// should be able to simplify the cast to just a trivial value and
// FIXME(https://github.com/apple/swift/issues/49723): Since we model this as unowned, then we must copy the value before use.
// This directly contradicts the semantics mentioned above since we will copy
// the value upon any use lest we use an unowned value in an owned or guaranteed
// way. So really all we will do here is perhaps add a copy slightly earlier
// unless the unowned value immediately is cast to something trivial. In such a
// case, we should be able to simplify the cast to just a trivial value and
// then eliminate the copy. That being said, we should investigate
// this since this is used in reinterpret_cast which is important from
// a performance perspective.
Expand Down
4 changes: 2 additions & 2 deletions lib/SILGen/SILGenBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ static ManagedValue emitBuiltinAutoDiffApplyDerivativeFunction(
AutoDiffDerivativeFunctionKind kind, unsigned arity,
bool throws, SILGenFunction &SGF, SILLocation loc,
SubstitutionMap substitutions, ArrayRef<ManagedValue> args, SGFContext C) {
// FIXME(SR-11853): Support throwing functions.
// FIXME(https://github.com/apple/swift/issues/54259): Support throwing functions.
assert(!throws && "Throwing functions are not yet supported");

auto origFnVal = args[0].getValue();
Expand Down Expand Up @@ -1221,7 +1221,7 @@ static ManagedValue emitBuiltinAutoDiffApplyDerivativeFunction(
static ManagedValue emitBuiltinAutoDiffApplyTransposeFunction(
unsigned arity, bool throws, SILGenFunction &SGF, SILLocation loc,
SubstitutionMap substitutions, ArrayRef<ManagedValue> args, SGFContext C) {
// FIXME(SR-11853): Support throwing functions.
// FIXME(https://github.com/apple/swift/issues/54259): Support throwing functions.
assert(!throws && "Throwing functions are not yet supported");

auto origFnVal = args.front().getValue();
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Differentiation/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ bool isSemanticMemberAccessor(SILFunction *original) {
if (!accessor)
return false;
// Currently, only getters and setters are supported.
// TODO(SR-12640): Support `modify` accessors.
// TODO(https://github.com/apple/swift/issues/55084): Support `modify` accessors.
if (accessor->getAccessorKind() != AccessorKind::Get &&
accessor->getAccessorKind() != AccessorKind::Set)
return false;
Expand Down
5 changes: 2 additions & 3 deletions lib/SILOptimizer/Differentiation/PullbackCloner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ class PullbackCloner::Implementation final
// $L | address-only | address, $*A' (no alternative)
// $*A | address-only | address, $*A' (no alternative)

// TODO(SR-13077): Make "tangent value category" depend solely on whether
// the tangent type is loadable or address-only.
// TODO(https://github.com/apple/swift/issues/55523): Make "tangent value category" depend solely on whether the tangent type is loadable or address-only.
//
// For loadable tangent types, using symbolic adjoint values instead of
// concrete adjoint buffers is more efficient.
Expand Down Expand Up @@ -2599,7 +2598,7 @@ bool PullbackCloner::Implementation::runForSemanticMemberAccessor() {
return runForSemanticMemberGetter();
case AccessorKind::Set:
return runForSemanticMemberSetter();
// TODO(SR-12640): Support `modify` accessors.
// TODO(https://github.com/apple/swift/issues/55084): Support `modify` accessors.
default:
llvm_unreachable("Unsupported accessor kind; inconsistent with "
"`isSemanticMemberAccessor`?");
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Mandatory/Differentiation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ void Differentiation::run() {
} else if (auto *lfi = dyn_cast<LinearFunctionInst>(&i)) {
// If linear map transposition is not enabled and an uncanonical
// `linear_function` instruction is encountered, emit a diagnostic.
// FIXME(SR-11850): Finish support for linear map transposition.
// FIXME(https://github.com/apple/swift/issues/54256): Finish support for linear map transposition.
if (!EnableExperimentalLinearMapTransposition) {
if (!lfi->hasTransposeFunction()) {
astCtx.Diags.diagnose(
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/CSApply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6607,7 +6607,7 @@ Expr *ExprRewriter::coerceToType(Expr *expr, Type toType,
// foo(bar) // This expression should compile in Swift 3 mode
// ```
//
// See also: https://bugs.swift.org/browse/SR-6796
// See also: https://github.com/apple/swift/issues/49345
if (cs.getASTContext().isSwiftVersionAtLeast(4) &&
!cs.getASTContext().isSwiftVersionAtLeast(5)) {
auto obj1 = fromType->getOptionalObjectType();
Expand Down
Loading