[Lldb-commits] [clang] [lldb] [clang][AST] fix ast-print of extern <lang> with >=2 declarators, fixed (PR #93913)

Erich Keane via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 7 11:42:58 PDT 2024


erichkeane wrote:

> > I see the 2nds commit doesn't add any tests! Please make it do so
> 
> I've tried and I'm not quite sure how to do it. The issue is we need to test AST printing of «implicitly declared» functions, such as builtins and functions instrumented by lldb, such as `log` for logging; which seems contradictory. Do you have any suggestions?
> 
> Furthermore, the second commit adds an assertion of an invariant and then fixes the places in the code where the invariant breaks. Is it fair to say that the codebase itself is the test for the invariant? If any codepath would break the invariant, the assertion would be triggered. Not on a release build though, I imagine.

Hmm... I don't have a great idea.  Is using it not enough to get it to be emitted?  I see here we don't seem to cause them to be emitted: https://godbolt.org/z/nYzMca7Te

Perhaps @AaronBallman has an idea.

https://github.com/llvm/llvm-project/pull/93913


More information about the lldb-commits mailing list