Happens when DestContext is LinkageSpecDecl and hense CurContext happens to be
both not TagDecl and NamespaceDecl.
Minimal reproducer: trigger define outline in
namespace ns { extern "C" { typedef int foo; } foo Fo^o(int id) { return id; } }
Differential D107047
[clangd] Fix the crash in getQualification kbobyrev on Jul 29 2021, 2:30 AM. Authored by
Details
Happens when DestContext is LinkageSpecDecl and hense CurContext happens to be Minimal reproducer: trigger define outline in namespace ns { extern "C" { typedef int foo; } foo Fo^o(int id) { return id; } }
Diff Detail
Event TimelineComment Actions thanks for chasing this down! as mentioned offline a test case like: namespace ns { extern "C" { typedef int foo; } foo Fo^o(int id) { return id; } } in define outline should be enough to ensure it is WAI.
|
rather than having !NNS in the check below it might be nicer to put:
I believe continue makes sense, that way we can spell in cases like:
foo should still become ns::foo in other contexts.