[Lldb-commits] [PATCH] D71378: Modifying ImportDeclContext(...) to ensure that we complete each FieldDecl of a RecordDecl when we are importing the definiton

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 12 04:34:05 PST 2019

teemperor added a comment.

I wonder if we have a way to fix this from with LLDB. Having Clang code that is only tested in LLDB is always a bit weird.

Otherwise the idea itself LGTM, thanks for working on this (and reducing the test case to that!)

Comment at: clang/lib/AST/ASTImporter.cpp:1688
+    // If we are in the process of ImportDefinition(...) for a RecordDecl we
+    // want to make sure that we are also completeing each FieldDecl. There
+    // are currently cases where this does not happen and this is correctness

Comment at: lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp:27
+   void g() {
+       return; //%self.expect("p b_ref", substrs=['(B) $0 =', '(spd = NS::DW', 'a = 0)'])
+   }
You might want to explicitly call clang-format on this example as there are few indentation errors (this line, the `f()` declaration, line 20, etc.). We disabled clang-format for tests so that may require some workarounds (temporarily copying out of tree is the easiest probably)



More information about the lldb-commits mailing list