Haojian Wu
6aa2e49648
[clang][Parser] Fix an assertion during decltype error recovery with missing ; ( #188123 )
...
Fix an assertion failure in `ParseDecltypeSpecifier` when parsing
malformed expressions e.g. `decltype(union { ... )`.
When a class/union definition is missing a semicolon, clang's error
recovery may synthetically set the current token to `tok::semi` without
actually inserting it into the preprocessor's backtrack cache, see
9096c9cda3/clang/lib/Parse/ParseDeclCXX.cpp (L1920-L1927)
If `ParseDecltypeSpecifier` later encounters this synthetic semicolon
during its own error recovery, its attempts to revert the cache and
re-lex the tokens will lead to reading unexpected tokens from the
historical stream, failing the strict
`Tok.is(tok::semi)` assertion.
This patch removes this assertion, acknowledging that during invalid
parses and error recovery, the preprocessor's cache state may not
strictly align with the parser's simulated state.
Fixes : #188014
2026-03-31 20:30:28 +00:00
..
2025-02-27 10:41:04 -05:00
2024-05-21 15:01:13 -04:00
2025-07-08 11:36:52 +03:00
2025-07-08 11:36:52 +03:00
2025-07-08 11:36:52 +03:00
2024-05-19 10:46:12 -07:00
2024-08-15 14:42:39 -04:00
2025-08-23 11:43:58 +02:00
2025-05-09 14:10:18 -04:00
2024-01-15 09:41:32 +00:00
2024-01-15 09:41:32 +00:00
2025-05-09 00:49:01 +03:00
2025-10-17 21:50:08 +03:00
2024-04-03 18:39:53 +02:00
2025-07-07 07:09:09 -04:00
2024-02-16 15:08:04 -05:00
2024-03-06 09:46:35 +01:00
2025-07-07 07:09:09 -04:00
2024-10-02 01:54:29 +02:00
2024-07-01 17:43:07 +02:00
2024-01-27 10:23:38 +01:00
2025-08-23 01:31:06 +03:00
2025-07-08 11:36:52 +03:00
2026-03-12 16:56:43 +00:00
2024-01-15 09:41:32 +00:00
2025-10-05 06:20:09 +00:00
2025-10-16 18:28:38 +02:00
2025-10-16 18:28:38 +02:00
2025-06-13 06:45:40 -04:00
2025-08-04 08:51:22 +02:00
2024-07-15 13:22:40 +02:00
2024-04-23 20:34:22 +08:00
2025-09-30 02:16:01 +03:00
2026-01-17 10:43:51 -05:00
2025-10-16 18:28:38 +02:00
2024-11-19 14:31:00 -05:00
2025-08-14 12:51:58 +02:00
2025-06-13 06:45:40 -04:00
2025-08-04 08:51:22 +02:00
2024-08-15 21:16:30 +02:00
2025-03-10 09:37:38 -03:00
2025-09-15 21:04:45 +08:00
2024-03-21 12:57:24 +01:00
2025-06-15 00:01:25 +03:00
2024-10-11 06:10:03 -07:00
2025-07-29 11:53:02 +08:00
2026-03-12 16:56:43 +00:00
2026-03-24 14:31:42 -04:00
2026-03-24 14:31:42 -04:00
2024-10-02 01:54:29 +02:00
2025-03-10 09:37:38 -03:00
2024-09-18 10:11:03 +02:00
2024-10-02 16:40:06 +02:00
2025-04-22 10:41:16 +08:00
2024-02-13 14:25:56 -05:00
2024-03-04 09:25:29 -08:00
2024-01-04 21:04:54 +01:00
2025-05-13 06:31:10 -04:00
2025-06-16 23:17:47 +08:00
2025-12-03 17:24:33 +02:00
2025-05-31 19:34:11 -03:00
2025-03-10 10:32:08 +01:00
2025-03-14 15:30:01 +01:00
2025-08-04 08:51:22 +02:00
2025-08-14 12:51:58 +02:00
2025-09-15 16:55:00 +00:00
2024-05-28 14:55:18 -04:00
2026-03-31 20:30:28 +00:00
2025-03-21 03:55:42 +01:00
2025-12-11 05:54:09 +01:00
2025-12-11 05:54:09 +01:00
2025-10-15 10:30:03 -03:00
2025-07-25 15:21:30 -04:00
2025-08-14 06:42:55 -03:00
2026-01-06 21:38:41 +02:00
2025-08-13 07:03:09 -07:00
2025-04-21 18:12:07 +03:00
2024-05-04 23:08:11 -07:00
2024-08-22 23:33:40 +02:00
2024-08-21 17:38:24 +04:00
2024-07-02 08:19:07 -04:00
2024-01-10 08:49:36 +08:00
2024-01-10 08:49:36 +08:00
2024-12-10 09:17:41 +01:00
2025-07-15 18:09:51 +02:00
2025-04-30 07:31:42 -07:00
2025-09-02 16:37:19 +00:00
2025-11-06 22:55:36 +02:00
2024-05-21 15:14:03 -04:00
2025-06-11 14:19:25 -07:00
2026-01-13 12:33:58 +01:00
2025-08-09 05:06:53 -03:00
2025-11-05 14:43:40 +08:00
2024-07-26 08:39:46 -04:00
2025-01-09 17:01:30 +02:00
2024-05-03 10:23:53 -07:00
2024-12-20 09:47:26 -08:00
2025-06-13 06:45:40 -04:00
2024-05-23 14:50:29 -04:00
2025-06-15 00:01:25 +03:00
2024-12-20 09:47:26 -08:00
2024-03-21 12:57:24 +01:00
2025-06-13 06:45:40 -04:00
2025-03-19 15:16:38 +01:00
2026-02-06 11:32:17 -05:00
2026-02-06 11:32:17 -05:00
2026-02-26 23:48:53 +02:00
2026-01-23 14:46:31 -05:00
2026-01-23 14:46:31 -05:00
2025-12-11 12:18:35 -05:00
2024-04-29 22:00:41 +08:00
2025-01-18 19:16:33 +01:00
2025-04-15 12:54:25 -07:00
2025-10-02 16:11:31 +02:00
2025-06-13 06:45:40 -04:00
2025-04-18 16:27:27 +08:00
2025-07-09 08:54:30 +08:00
2025-07-08 09:34:13 +02:00
2024-09-16 08:58:50 -04:00
2025-06-13 06:45:40 -04:00
2025-06-13 06:45:40 -04:00
2025-04-25 08:21:41 -04:00
2025-09-14 10:09:46 -07:00