Anastasia added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:8186
 
-  const RecordDecl *PD = PT->castAs<RecordType>()->getDecl();
-  VisitStack.push_back(PD);
+  // At this point we already handled everything except of a RecordType or
+  // an ArrayType[RecordType].
----------------
I am a bit confused about this comment, `do you mean a PointerType to a 
RecordType or an ArrayType of a RecordType`?


================
Comment at: lib/Sema/SemaDecl.cpp:8186
 
-  const RecordDecl *PD = PT->castAs<RecordType>()->getDecl();
-  VisitStack.push_back(PD);
+  // At this point we already handled everything except of a RecordType or
+  // an ArrayType[RecordType].
----------------
Anastasia wrote:
> I am a bit confused about this comment, `do you mean a PointerType to a 
> RecordType or an ArrayType of a RecordType`?
Also is there any test case covering this change?


================
Comment at: lib/Sema/SemaDecl.cpp:8189
+  const RecordType *RecTy =
+      PT->getPointeeOrArrayElementType()->getAs<RecordType>();
+  const RecordDecl *OrigRecDecl = RecTy->getDecl();
----------------
yaxunl wrote:
> Can we have a test for this change? e.g. an array of structs
I am wondering if `PT->getPointeeOrArrayElementType()` is `nullptr`? Do we need 
to add an extra check?


Repository:
  rC Clang

https://reviews.llvm.org/D49725



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

Reply via email to