Files
swift-mirror/include/swift/AST/DiagnosticsIDE.def
Rintaro Ishizaki df2b9715ba [CodeCompletion] Add "soft deprected" diagnostics for code completion
'available(..., deprecated: <version>)'. If the version is larger than the
current active version, the declaration is "soft deprecated". Emit a
relevant diagnostics for those items. If the version is equal to or
larger than '100000.0', it means the distant future without specifying
the version.

rdar://76122625
2021-08-10 17:11:14 -07:00

53 lines
2.1 KiB
C++

//===--- 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"
//===----------------------------------------------------------------------===//
ERROR(ide_async_in_nonasync_context, none,
"async %0 used in a context that does not support concurrency",
(DeclName))
// NOTE: This is WARNING because this is emitted for cross actor references with
// non-'Sendable' types. That is optionally ('-warn-concurrency') warning in
// Swift 5.5.
WARNING(ide_cross_actor_reference_swift5, none,
"actor-isolated %0 should only be referenced from inside the actor",
(DeclName))
WARNING(ide_redundant_import, none,
"module %0 is already imported", (DeclName))
// FIXME: Inform which other 'import' this module came from.
NOTE(ide_redundant_import_indirect, none,
"module %0 is already imported via another module import", (DeclName))
WARNING(ide_availability_softdeprecated, Deprecation,
"%select{getter for |setter for |}0%1 will be deprecated"
" in %select{a future version|%select{a future version of %3|%3 %5}4}2"
"%select{|: %6}6",
(unsigned, DeclName, bool, StringRef, bool, llvm::VersionTuple,
StringRef))
WARNING(ide_availability_softdeprecated_rename, Deprecation,
"%select{getter for |setter for |}0%1 will be deprecated"
" in %select{a future version|%select{a future version of %3|%3 %5}4}2"
": renamed to '%6'",
(unsigned, DeclName, bool, StringRef, bool, llvm::VersionTuple, StringRef))
//===----------------------------------------------------------------------===//
#define UNDEFINE_DIAGNOSTIC_MACROS
#include "DefineDiagnosticMacros.h"