Files
swift-mirror/userdocs/diagnostics/clang-declaration-import.md
Ben Barham 32ec5a61b7 Add groupings for the various diagnostics
Also make the titles and one line summaries a little more consistent (at
least for diagnsotic groups and upcoming language features, haven't gone
through the educational notes).
2025-06-05 15:49:46 -07:00

632 B
Raw Permalink Blame History

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