Revert "[lldb] Disable minimal import mode for RecordDecls that back FieldDecls"
authorJordan Rupprecht <rupprecht@google.com>
Wed, 10 Nov 2021 18:31:30 +0000 (10:31 -0800)
committerJordan Rupprecht <rupprecht@google.com>
Wed, 10 Nov 2021 18:38:01 +0000 (10:38 -0800)
commit360d901bf0478293d6e57f58bdb63b386f97f531
treefe933ffca14ae399fbd72056ad8abe971111ac94
parentbbef51eb43c2e8f8e36fbbc0d0b4cca75b6f0863
Revert "[lldb] Disable minimal import mode for RecordDecls that back FieldDecls"

This reverts commit 3bf96b0329be554c67282b0d7d8da6a864b9e38f.

It causes crashes as reported in PR52257 and a few other places. A reproducer is bundled with this commit to verify any fix forward. The original test is left in place, but marked XFAIL as it now produces the wrong result.

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D113449
lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
lldb/test/API/commands/expression/pr52257/Makefile [new file with mode: 0644]
lldb/test/API/commands/expression/pr52257/TestExprCrash.py [new file with mode: 0644]
lldb/test/API/commands/expression/pr52257/main.cpp [new file with mode: 0644]
lldb/test/API/lang/cpp/reference-to-outer-type/TestCppReferenceToOuterClass.py