rnk added inline comments.

================
Comment at: lib/CodeGen/CGDebugInfo.cpp:1075
@@ +1074,3 @@
+      } else if (const auto *nestedRec = dyn_cast<CXXRecordDecl>(I)) {
+        if (!nestedRec->isImplicit())
+          CollectRecordNestedRecord(nestedRec, elements);
----------------
I would add `&& nestedRec->getDeclContext() == record` to this condition to 
deal with the `struct B { B(struct A*); };` test case.

================
Comment at: test/CodeGenObjCXX/debug-info-cyclic.mm:11
@@ -10,3 +10,3 @@
 // CHECK-SAME:                             identifier:
-// CHECK: ![[BMEMBERS]] = !{![[BB:[0-9]+]]}
+// CHECK: ![[BMEMBERS]] = !{![[A:[0-9]+]], ![[BB:[0-9]+]]}
   B(struct A *);
----------------
This is interesting, this test case shouldn't change. The lexical context for 
'struct A' is B, but the semantic context is the surrounding TU. We should only 
list class members that use the parent class as their DeclContext.

Also, why is this an Obj-C++ test in the first place, it only uses C++...


http://reviews.llvm.org/D21705



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to