Closed martinboehme closed 2 weeks ago
@llvm/pr-subscribers-clang-analysis
Author: None (martinboehme)
@llvm/pr-subscribers-clang
Author: None (martinboehme)
Windows CI failure is in Driver/amdgpu-toolchain.c. This looks unrelated.
Hello and good morning from the UK!
It looks as though this change caused a test failure on the following buildbot: https://lab.llvm.org/buildbot/#/builders/216/builds/38446
Are you able to take a look see?
many thanks for yoru time, Tom W
Reverted in 2252c5c42b95dd12dda0c7fb1b2811f943b21949
Hello and good morning from the UK!
It looks as though this change caused a test failure on the following buildbot: https://lab.llvm.org/buildbot/#/builders/216/builds/38446
Are you able to take a look see?
many thanks for yoru time, Tom W
Sorry, didn't see this in time.
Reverted in 2252c5c
Thanks for the revert!
Will investigate and reland with a fix.
Trying to do so can cause crashes -- see newly added test and the comments in the fix.
We're starting to see a repeating pattern here: We're getting crashes because
ResultObjectVisitor
andgetReferencedDecls()
don't agree on which parts of the AST to visit and, hence, which fields should be modeled.I think we should ensure consistency between these two parts of the code by using a
RecursiveASTVisitor
ingetReferencedDecls()
[^1]; theTraverse...()
functions that control which parts of the AST we visit would go in a common base class that would be used for bothResultObjectVisitor
andgetReferencedDecls()
.I'd like to focus this PR, however, on a targeted fix for the current crash and postpone the refactoring to a later PR (which will be easier to revert if there are unintended side-effects).
[^1]: As an added bonus, this would make the code better structured and more efficient than the current sequence of
if (dyn_cast<T>(...))
statements).