This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Make ParseTemplateParameterInfos return false if there are no template params
ClosedPublic

Authored by aeubanks on Dec 8 2022, 10:02 AM.

Details

Diff Detail

Event Timeline

aeubanks created this revision.Dec 8 2022, 10:02 AM
Herald added a project: Restricted Project. · View Herald Transcript
aeubanks requested review of this revision.Dec 8 2022, 10:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 10:02 AM
dblaikie added inline comments.Dec 8 2022, 2:39 PM
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
1262

This part changes behavior, yeah? (previously the code was only conditional on has_template_params and is now conditional on both that and there actually being template parameter DIEs) Was that intended? If so, is there any testing that could be done to demonstrate the change in behavior?

aeubanks added inline comments.Dec 8 2022, 2:43 PM
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
1262

presumably any visible change would only happen with broken debug info

has_template_params is true if there are any template parameter child DIEs, but now we do more checking that those DIEs are actually reasonable

I can revert this back if you want, but this seems better and I don't think I'm going to find time to add a test for broken debug info which may or may not actually hit this code path

Michael137 added inline comments.Dec 9 2022, 3:22 AM
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
1262

Agree with David that if it's behaviour changing we should either test or leave as is

aeubanks updated this revision to Diff 481711.Dec 9 2022, 11:40 AM

revert one change to make this nfc

Michael137 accepted this revision.Dec 10 2022, 8:23 AM
This revision is now accepted and ready to land.Dec 10 2022, 8:23 AM