Shanzhi
b12a742c20
[Clang][AST] Fix a crash on attaching doc comments ( #78716 )
...
This crash is basically caused by calling
`ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
`RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
files. A reduced reproducer is provided in this patch.
After the source locations for instantiations of funtion template are
corrected in the commit 256a0b298c68b89688b80350b034daf2f7785b67, the
variable `CommitsInThisFile` in the function
`ASTContext::attachCommentsToJustParsedDecls` would refer to the source
file rather than the header file for implicit function template
instantiation. Therefore, in the first loop in
`ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
adjusted for relevant scenarios like the second loop.
Fixes #67979
Fixes #68524
Fixes #70550
(cherry picked from commit 5f4ee5a2dfa97fe32ee62d1d67aa1413d5a059e6)
2024-02-08 15:59:07 -08:00
..
2023-12-06 15:27:27 -08:00
2023-08-10 08:02:32 +08:00
2024-01-19 10:08:03 +01:00
2023-02-13 19:26:11 +00:00
2024-02-08 15:59:07 -08:00
2022-08-12 00:05:59 +01:00
2023-10-24 14:02:51 +01:00
2023-10-26 19:28:28 +01:00
2021-10-21 11:34:43 -07:00
2021-10-21 11:34:43 -07:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2021-12-31 01:30:39 +01:00
2023-08-28 06:34:57 +02:00
2023-08-15 22:24:42 +02:00
2023-02-10 19:11:31 +00:00
2023-10-26 19:28:28 +01:00
2023-07-22 09:34:15 -07:00
2023-05-08 07:41:27 -07:00
2023-07-22 09:34:15 -07:00
2021-10-21 11:34:43 -07:00
2022-02-10 20:39:20 -06:00
2022-05-13 13:48:46 +02:00
2023-01-17 07:29:31 -08:00
2022-07-21 09:17:01 +01:00
2021-05-20 17:04:29 -04:00
2024-01-09 10:32:06 +01:00
2022-02-10 20:39:20 -06:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2022-02-24 15:30:30 -05:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2022-04-04 18:48:30 -07:00
2021-06-10 14:51:08 +02:00
2023-08-16 10:22:16 +02:00
2022-02-10 20:39:20 -06:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2022-10-31 19:34:23 +01:00
2023-10-26 19:28:28 +01:00
2022-02-10 20:39:20 -06:00
2022-03-21 13:39:44 -04:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-05-04 19:19:52 +02:00
2021-06-10 10:18:52 +01:00
2024-01-17 12:11:16 +01:00
2022-01-10 10:38:27 +01:00
2023-10-26 19:28:28 +01:00
2023-03-24 17:35:35 +03:00
2022-02-10 20:39:20 -06:00
2022-11-24 12:44:35 +00:00
2023-10-26 19:28:28 +01:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-09-04 05:29:32 +00:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2023-09-05 18:15:06 +02:00
2022-02-09 09:11:49 -05:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2021-10-27 21:04:32 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2023-06-15 12:41:09 +05:30
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2023-08-18 14:14:29 +00:00
2022-02-09 09:11:49 -05:00
2023-10-26 19:28:28 +01:00
2021-10-05 07:59:32 -05:00
2022-07-03 17:06:26 +07:00
2022-10-31 19:34:23 +01:00
2023-10-26 19:28:28 +01:00
2021-10-21 11:34:43 -07:00
2023-10-26 19:28:28 +01:00
2023-07-11 09:14:27 +02:00
2023-10-26 19:28:28 +01:00
2023-07-24 18:32:46 +08:00
2024-01-15 09:41:32 +00:00
2024-02-03 10:35:40 -08:00
2022-02-24 15:30:13 -05:00
2023-10-26 19:28:28 +01:00
2022-02-24 15:30:13 -05:00
2022-09-21 19:37:22 +00:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2023-11-13 16:39:40 -05:00
2023-10-26 19:28:28 +01:00
2023-10-26 19:28:28 +01:00
2021-11-14 21:09:11 -08:00
2023-10-26 19:28:28 +01:00
2022-10-31 19:34:23 +01:00
2022-02-10 20:39:20 -06:00
2023-10-26 19:28:28 +01:00
2023-10-04 04:45:46 -05:00
2022-09-04 05:29:32 +00:00
2022-10-12 19:54:51 +02:00
2023-03-16 12:59:26 +01:00
2023-09-05 18:15:06 +02:00
2023-09-21 13:28:04 -07:00
2023-09-07 13:35:50 -07:00
2023-09-07 13:35:50 -07:00
2022-02-09 09:11:49 -05:00
2022-02-09 09:11:49 -05:00
2022-07-03 17:06:26 +07:00
2021-10-15 16:23:04 +00:00
2023-09-07 13:35:50 -07:00
2023-09-07 13:35:50 -07:00
2023-06-07 10:57:31 -04:00
2021-08-13 13:20:11 +03:00
2022-03-16 11:10:32 +01:00
2021-10-21 11:34:43 -07:00
2023-07-22 09:34:15 -07:00
2023-09-26 16:55:04 +02:00
2021-11-19 13:00:26 -08:00
2022-02-09 09:11:49 -05:00
2022-12-27 19:18:07 +00:00
2022-03-14 09:24:19 -04:00
2022-08-26 00:52:52 +03:00
2022-10-26 22:00:49 +00:00
2022-11-17 12:05:28 +07:00
2022-03-03 06:33:49 -08:00
2023-08-10 08:02:32 +08:00
2023-10-26 19:28:28 +01:00
2022-05-17 08:13:37 -04:00
2022-10-15 22:08:36 +02:00
2023-02-03 13:47:13 +01:00
2023-07-21 23:16:51 -04:00
2022-02-09 09:11:49 -05:00
2022-10-31 19:34:23 +01:00
2023-10-26 19:28:28 +01:00
2023-05-23 08:29:52 +02:00
2022-02-09 09:11:49 -05:00
2022-02-22 16:27:32 +01:00
2022-06-15 11:58:26 +02:00
2022-01-10 10:38:27 +01:00
2023-12-09 14:35:38 +04:00
2022-02-10 20:39:20 -06:00
2022-02-10 20:39:20 -06:00
2023-09-29 19:12:49 +02:00
2023-10-26 19:28:28 +01:00
2022-06-19 00:30:37 +03:00
2021-10-21 11:34:43 -07:00
2022-02-09 09:11:49 -05:00
2022-03-18 12:20:41 +00:00
2022-03-18 12:20:41 +00:00
2023-10-26 19:28:28 +01:00