[lldb][tests][gmodules] Test for expression evaluator crash for types referencing...
authorMichael Buch <michaelbuch12@gmail.com>
Thu, 15 Sep 2022 02:36:07 +0000 (22:36 -0400)
committerMichael Buch <michaelbuch12@gmail.com>
Fri, 16 Sep 2022 16:38:49 +0000 (12:38 -0400)
commit3004a759bcdf7b0a2a3a4220ed216d20defbd081
tree8715b6611f8f939450e4c79e146c429316b65ea9
parent44754705290abd6bde8509221610ad96936aa422
[lldb][tests][gmodules] Test for expression evaluator crash for types referencing the same template

The problem here is that the ASTImporter adds
the template class member FieldDecl to
the DeclContext twice. This happens because
we don't construct a `LookupPtr` for decls
that originate from modules and thus the
ASTImporter never realizes that the FieldDecl
has already been imported. These duplicate
decls then break the assumption of the LayoutBuilder
which expects only a single member decl to
exist.

The test will be fixed by a follow-up revision
and is thus skipped for now.

Differential Revision: https://reviews.llvm.org/D133944
lldb/test/API/lang/cpp/gmodules/template-with-same-arg/Makefile [new file with mode: 0644]
lldb/test/API/lang/cpp/gmodules/template-with-same-arg/TestTemplateWithSameArg.py [new file with mode: 0644]
lldb/test/API/lang/cpp/gmodules/template-with-same-arg/base_module.cpp [new file with mode: 0644]
lldb/test/API/lang/cpp/gmodules/template-with-same-arg/base_module.h [new file with mode: 0644]
lldb/test/API/lang/cpp/gmodules/template-with-same-arg/main.cpp [new file with mode: 0644]
lldb/test/API/lang/cpp/gmodules/template-with-same-arg/module.modulemap [new file with mode: 0644]
lldb/test/API/lang/cpp/gmodules/template-with-same-arg/module1.cpp [new file with mode: 0644]
lldb/test/API/lang/cpp/gmodules/template-with-same-arg/module1.h [new file with mode: 0644]
lldb/test/API/lang/cpp/gmodules/template-with-same-arg/module2.cpp [new file with mode: 0644]
lldb/test/API/lang/cpp/gmodules/template-with-same-arg/module2.h [new file with mode: 0644]