aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
diff options
context:
space:
mode:
authorNathan Ridge <zeratul976@hotmail.com>2024-09-20 02:23:58 -0400
committerGitHub <noreply@github.com>2024-09-20 02:23:58 -0400
commitea578804c81bbad1f31a0c940c8f4378d6893ede (patch)
treec3718681728b46faebad2cd24c06bdec2090e5ac /lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
parent173841cc56a12410e6ca7e4a37151d7057c6d20f (diff)
downloadllvm-ea578804c81bbad1f31a0c940c8f4378d6893ede.zip
llvm-ea578804c81bbad1f31a0c940c8f4378d6893ede.tar.gz
llvm-ea578804c81bbad1f31a0c940c8f4378d6893ede.tar.bz2
[AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (#108475)
The previous implementation had a bug where, if it was called on a Decl later in the redecl chain than `LastCheckedDecl`, it could incorrectly skip and overlook a Decl with a comment. The patch addresses this by only using `LastCheckedDecl` if the input Decl `D` is on the path from the first (canonical) Decl to `LastCheckedDecl`. An alternative that was considered was to start the iteration from the (canonical) Decl, however this ran into problems with the modelling of explicit template specializations in the AST where the canonical Decl can be unusual. With the current solution, if no Decls were checked yet, we prefer to check the input Decl over the canonical one. Fixes https://github.com/llvm/llvm-project/issues/108145
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp')
0 files changed, 0 insertions, 0 deletions