ahatanak added inline comments.

================
Comment at: test/CodeGenObjCXX/encode.mm:231
@@ +230,3 @@
+struct S {
+  typedef T Ty;
+  Ty *t;
----------------
manmanren wrote:
> I wonder if we can further reduce the testing case. Is this necessary to 
> cause the infinite recursion?
Yes. If I remove the typedef and declare "t" as a pointer to "T", clang 
terminates normally. If you look at the code near ASTContext.cpp:5960, you'll 
see getObjCEncodingForTypeImpl is called recursively only if the pointee type 
is a typedef, which is why the typedef is necessary to cause infinite recursion 
in this case.


https://reviews.llvm.org/D22929



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

Reply via email to