//===--- DiagnosticsIDE.def - Diagnostics Text ------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2021 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
//
//===----------------------------------------------------------------------===//

#define DEFINE_DIAGNOSTIC_MACROS
#include "DefineDiagnosticMacros.h"

//===----------------------------------------------------------------------===//

WARNING(ide_has_async_alternative, none,
        "%0 has an async alternative that should be preferred in an async "
        "context", (StringRef))

WARNING(ide_redundant_import, none,
        "module %0 is already imported", (StringRef))

// FIXME: Inform which other 'import' this module came from.
NOTE(ide_redundant_import_indirect, none,
     "module %0 is already imported via another module import", (StringRef))

WARNING(ide_availability_softdeprecated, Deprecation,
        "%0 will be deprecated"
        " in %select{a future version|%select{a future version of %2|%2 %4}3}1"
        "%select{|: %5}5",
        (const ValueDecl *, bool, StringRef, bool, llvm::VersionTuple,
         StringRef))

WARNING(ide_availability_softdeprecated_rename, Deprecation,
        "%0 will be deprecated"
        " in %select{a future version|%select{a future version of %2|%2 %4}3}1"
        ": renamed to '%5'",
        (const ValueDecl *, bool, StringRef, bool, llvm::VersionTuple, StringRef))

WARNING(ide_recursive_accessor_reference,none,
        "attempting to %select{access|modify}1 %0 within its own "
        "%select{getter|setter}1", (StringRef, bool))

//===----------------------------------------------------------------------===//

#define UNDEFINE_DIAGNOSTIC_MACROS
#include "DefineDiagnosticMacros.h"
