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

20 lines
632 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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
```