Imported Clang declaration warnings (ClangDeclarationImport)
Covers all warnings related to malformed APIs that are imported into Swift from C, C++, and Obj-C headers.
Overview
As one example of a potential malformed API diagnostic, suppose a Clang module dependency contained the following declaration:
typedef int NotificationIdentifier
__attribute__((swift_name("Notification.Identifier")))The Swift compiler would emit the following warning if no type named Notification could be found:
warning: imported declaration 'NotificationIdentifier' could not be mapped to 'Notification.Identifier’See Also
@dynamicCallable implementation requirements (DynamicCallable)Add @preconcurrency import (AddPreconcurrencyImport)Always enabled availability domains (AlwaysAvailableDomain)Argument matching for trailing closures (TrailingClosureMatching)Calling a mutating async actor-isolated method (ActorIsolatedMutatingAsync)Calling an actor-isolated method from a synchronous nonisolated context (ActorIsolatedCall)Captures in a `@Sendable` closure (SendableClosureCaptures)Compilation caching (CompilationCaching)Conforming to `StringInterpolationProtocol` (StringInterpolationConformance)Conversion from `@isolated(any)` function type to synchronous function type (ConversionFromIsolatedAnyToSynchronous)Cross-isolation data race (RegionIsolationCrossIsolationDataRace)Deprecated declaration warnings (DeprecatedDeclaration)Deprecated implementation-only imports (ImplementationOnlyDeprecated)Dynamic exclusivity (DynamicExclusivity)Embedded Swift language restrictions (EmbeddedRestrictions)