This is an archive of the discontinued LLVM Phabricator instance.

[expression evaluation] Prevent invalid function declarations ending up in clang AST
AbandonedPublic

Authored by ldrumm on Jul 6 2016, 11:29 AM.

Details

Reviewers
spyffe
jingham
Summary

Due to the way the lldb override for clang::ExternalASTSource::FindExternalGlobalVisibleDeclsByName callback was searching for functions, it was possible for invalid declarations to end up in the list of function declarations passed back to the clang AST, which subsequently caused clang to complain about ambiguous lookups. The logic used to prune duplicate function declarations based on lexical distance was ignoring the error status returned for invalid declarations which meant that they ended up in the list of resolved declarations passed back to clang.

Diff Detail

Event Timeline

ldrumm updated this revision to Diff 62920.Jul 6 2016, 11:29 AM
ldrumm retitled this revision from to [expression evaluation] Prevent invalid function declarations ending up in clang AST.
ldrumm updated this object.
ldrumm added reviewers: spyffe, jingham.
ldrumm added a subscriber: lldb-commits.
jingham edited edge metadata.Jul 6 2016, 12:02 PM

Shouldn't it be the job of the subsequent filtering loop to sort this out? The debugger should be able to call functions from a given frame, even if that function is not actually visible from the current frame. So I don't think you want to reject such functions from the candidate list. You just want to make sure that if there IS one visible, it should override the ones that aren't visible.

ldrumm abandoned this revision.Jan 15 2020, 6:42 AM