dc36515b | 05-Feb-2024 |
Dimitry Andric <dim@FreeBSD.org> |
Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):
[Clang][AST] Fix a crash on attaching doc comments (#78716)
This crash is basically caused by calling `ASTContext::getRawCommentForDe
Merge commit 5f4ee5a2dfa9 from llvm-project (by Shanzhi):
[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
This should fix a segfault when compiling graphics/gdal.
PR: 276104 MFC after: 1 month
show more ...
|
cf243934 | 14-Jun-2023 |
Dimitry Andric <dim@FreeBSD.org> |
Merge commit 69d42eef4bec from llvm-project (by Dimitry Andric):
[Clang] Show type in enum out of range diagnostic
When the diagnostic for an out of range enum value is printed, it currently
Merge commit 69d42eef4bec from llvm-project (by Dimitry Andric):
[Clang] Show type in enum out of range diagnostic
When the diagnostic for an out of range enum value is printed, it currently does not show the actual enum type in question, for example:
v8/src/base/bit-field.h:43:29: error: integer value 7 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion] static constexpr T kMax = static_cast<T>(kNumValues - 1); ^
This can make it cumbersome to find the cause for the problem. Add the enum type to the diagnostic message, to make it easier.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D152788
PR: 271047 MFC after: 1 month
show more ...
|