[lldb] Make module-ownership.mm test more robust against AST node ordering
authorRaphael Isemann <teemperor@gmail.com>
Fri, 8 May 2020 11:26:42 +0000 (13:26 +0200)
committerRaphael Isemann <teemperor@gmail.com>
Fri, 8 May 2020 11:44:13 +0000 (13:44 +0200)
commit710fa2c4ee346e1ec2db66ac5fdf6909e79d9a8c
treea89bded60ff98f6a06cc237eb97e9c1e675884f7
parent5f9f37c42a346e79a530ca1b12ec435b30d3c829
[lldb] Make module-ownership.mm test more robust against AST node ordering

The current test is checking both the anonymous structs and the template
specializations in one FileCheck run, but the anonymous struct line can
partially match the AST dump of a template specialization, causing that
FileCheck won't match that same line later against the template specialization
check and incorrectly fails on that check. This only happens when the
template specialization node somehow ends up before the anonymous struct node.

This patch just puts the checks for the anonymous structs in their own FileCheck
run to prevent them from partially matching any other record decl.

Fixes rdar://62997926
lldb/test/Shell/SymbolFile/DWARF/module-ownership.mm