aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/ScriptInterpreter.cpp
diff options
context:
space:
mode:
authorShanzhi <chenshanzhi@huawei.com>2024-01-29 19:17:13 +0800
committerGitHub <noreply@github.com>2024-01-29 19:17:13 +0800
commit5f4ee5a2dfa97fe32ee62d1d67aa1413d5a059e6 (patch)
tree0977012a2e61b3e60c609b8aa79aad6adde07c8e /lldb/source/Interpreter/ScriptInterpreter.cpp
parent14a15103cc9dbdb3e95c04627e0b96b5e3aa4944 (diff)
downloadllvm-5f4ee5a2dfa97fe32ee62d1d67aa1413d5a059e6.zip
llvm-5f4ee5a2dfa97fe32ee62d1d67aa1413d5a059e6.tar.gz
llvm-5f4ee5a2dfa97fe32ee62d1d67aa1413d5a059e6.tar.bz2
[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
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreter.cpp')
0 files changed, 0 insertions, 0 deletions