John Hui
f830b1c665
[ClangImporter] Do not import enum when already imported via DeclContext ( #85424 )
...
If we try to import this in ObjC interop mode:
```objc
typedef CF_OPTIONS(uint32_t, MyFlags) {
...
} CF_SWIFT_NAME(MyCtx.Flags);
struct MyStruct {
MyFlags flags;
...
} CF_SWIFT_NAME(MyCtx);
```
ClangImporter tries to import `MyCtx/MyStruct` before it imports
`MyFlags` (via `importDeclContextOf()`), which in turn tries to import
`MyFlags` again due to the `flags` field. The existing cycle-breaking
mechanism prevents us from looping infinitely, but leads us to import
two copies of the Swift `EnumDecl`, which can cause errors later during
CodeGen.
~~This patch adds an assertion to catch such issues earlier, and breaks
the cycle by checking the cache again.~~ This patch no longer does so
because that caused issues beyond the scope of this patch.
rdar://162317760
2025-11-17 13:18:59 -08:00
..
2024-08-12 17:47:26 -07:00
2025-10-20 10:40:37 +09:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-07-02 08:30:03 -07:00
2025-10-20 10:40:37 +09:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-05-05 14:16:53 -07:00
2025-10-04 14:19:52 -07:00
2023-10-05 15:12:48 -07:00
2023-10-05 15:12:48 -07:00
2023-10-05 15:12:48 -07:00
2025-10-22 17:21:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2024-08-21 11:38:54 -07:00
2025-10-17 08:09:13 -07:00
2025-10-16 18:42:07 +01:00
2025-10-16 18:42:07 +01:00
2025-06-10 22:11:05 -07:00
2025-06-10 22:11:05 -07:00
2025-10-04 14:19:52 -07:00
2024-08-12 14:01:22 -07:00
2024-10-28 10:18:40 -07:00
2023-08-28 13:48:57 -07:00
2025-10-05 14:01:44 -07:00
2025-10-04 14:19:52 -07:00
2025-10-21 11:30:52 -07:00
2025-10-21 11:30:52 -07:00
2023-04-04 08:52:39 -07:00
2025-10-21 11:30:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-07 13:22:34 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-07-31 20:03:00 +01:00
2023-07-11 07:47:58 -07:00
2025-04-01 14:55:37 -07:00
2023-07-11 07:47:58 -07:00
2024-08-24 08:10:49 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2024-11-01 13:49:09 +00:00
2025-11-17 13:18:59 -08:00
2024-05-28 12:59:26 -07:00
2022-04-15 20:13:00 -07:00
2025-10-29 19:35:55 -07:00
2025-05-13 16:02:15 -07:00
2025-08-19 18:41:07 +01:00
2025-04-14 10:01:23 -07:00
2025-08-18 10:16:51 -07:00
2025-04-16 10:18:48 -07:00
2025-06-08 12:45:40 -07:00
2021-12-16 14:56:55 -08:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-09-02 14:36:33 +01:00
2025-08-15 15:28:20 +01:00
2025-10-04 14:19:52 -07:00
2024-05-17 14:57:32 -07:00
2024-11-01 13:49:09 +00:00
2023-10-27 21:21:07 -07:00
2025-05-05 14:16:53 -07:00
2024-11-21 18:49:52 +01:00
2023-06-20 12:48:24 -07:00
2022-08-12 06:58:42 +03:00
2024-08-12 14:01:22 -07:00
2025-01-27 10:38:29 +01:00
2025-04-22 18:23:36 +01:00
2024-05-06 20:56:20 -07:00
2023-08-13 22:34:26 -07:00
2025-10-04 14:19:52 -07:00
2024-09-18 14:56:08 +01:00
2024-12-21 08:28:22 +01:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-03-11 17:18:43 -04:00
2024-02-19 02:48:36 -10:00
2024-02-19 02:48:36 -10:00
2024-02-19 02:48:36 -10:00
2024-02-19 02:48:36 -10:00
2023-03-07 16:00:16 -08:00
2024-02-19 02:48:36 -10:00
2024-02-19 02:48:36 -10:00
2024-11-01 13:49:09 +00:00
2024-11-01 13:49:09 +00:00
2023-02-20 15:58:38 -08:00
2024-02-19 02:48:36 -10:00
2022-02-01 16:52:26 -08:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2022-07-21 19:48:48 -07:00
2024-11-02 11:46:46 -07:00
2024-02-13 07:13:35 -08:00
2024-11-02 11:46:46 -07:00
2024-11-02 11:46:46 -07:00
2024-11-02 11:46:46 -07:00
2025-10-14 15:26:01 +01:00
2024-11-02 11:46:46 -07:00
2024-11-02 11:46:46 -07:00
2024-02-13 07:13:35 -08:00
2024-11-12 08:58:53 -08:00
2024-11-02 11:46:46 -07:00
2024-11-02 11:46:46 -07:00
2024-11-02 11:46:46 -07:00
2024-11-02 11:46:46 -07:00
2025-10-14 15:26:01 +01:00
2025-10-14 15:26:01 +01:00
2024-11-02 11:46:46 -07:00
2025-10-14 15:26:01 +01:00
2024-11-02 11:46:46 -07:00
2025-10-29 19:35:55 -07:00
2024-02-19 02:48:36 -10:00
2024-02-21 09:32:25 -08:00
2025-04-08 17:34:23 -07:00
2023-04-28 19:15:16 -04:00
2024-11-21 18:49:52 +01:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-03-11 17:18:43 -04:00
2025-03-11 17:18:43 -04:00
2023-03-10 22:52:07 -08:00
2025-10-04 14:19:52 -07:00
2025-01-17 17:22:55 -08:00
2024-02-19 02:48:36 -10:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-07 04:57:53 -07:00
2024-08-07 14:01:30 -07:00
2025-10-04 14:19:52 -07:00
2023-02-03 12:00:16 -08:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-03-24 20:18:34 +00:00
2024-11-02 11:46:46 -07:00
2025-10-04 14:19:52 -07:00
2022-11-07 18:37:50 -05:00
2024-09-10 10:35:05 -07:00
2025-10-04 14:19:52 -07:00
2025-03-26 00:34:15 -04:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-02-01 10:07:45 -08:00
2025-10-04 14:19:52 -07:00
2024-11-21 18:49:52 +01:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2022-08-12 06:58:42 +03:00
2025-04-22 18:23:36 +01:00
2025-10-04 14:19:52 -07:00
2025-04-22 18:23:36 +01:00
2024-11-21 18:49:52 +01:00
2025-10-04 14:19:52 -07:00
2023-09-03 11:49:31 -07:00
2024-02-19 02:48:36 -10:00
2024-09-22 21:15:45 +01:00
2024-09-22 21:15:45 +01:00
2022-04-21 09:31:12 -07:00
2024-09-22 21:15:45 +01:00
2024-09-22 23:10:40 +01:00
2023-03-20 15:49:13 -07:00
2023-08-21 15:58:59 -07:00
2025-06-30 10:39:26 +05:30
2023-08-21 15:58:59 -07:00
2024-02-13 07:13:35 -08:00
2025-10-01 11:33:24 -07:00
2023-09-02 13:53:14 -07:00
2022-05-29 21:55:31 +03:00
2025-10-04 14:19:52 -07:00
2024-11-19 11:15:22 -08:00
2025-10-04 14:19:52 -07:00
2025-11-10 15:57:33 +00:00
2025-07-03 23:17:19 -07:00
2024-02-19 02:48:36 -10:00
2025-10-04 14:19:52 -07:00
2024-09-04 15:59:57 -07:00
2021-06-07 12:04:31 -07:00
2025-10-04 14:19:52 -07:00
2024-12-23 22:15:52 -08:00
2024-06-21 16:03:21 -07:00
2025-05-07 18:19:38 +01:00
2025-10-04 14:19:52 -07:00
2025-11-06 21:00:44 +01:00
2025-10-04 14:19:52 -07:00
2025-10-29 19:35:55 -07:00
2025-10-29 19:35:55 -07:00
2025-06-06 09:35:51 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2025-10-04 14:19:52 -07:00
2024-12-23 22:15:52 -08:00
2022-04-18 17:22:34 -07:00
2024-11-21 18:49:52 +01:00
2023-10-09 20:02:48 -07:00
2023-02-28 13:19:05 -08:00
2025-07-02 08:30:03 -07:00
2023-01-31 16:17:11 -08:00