george.burgess.iv added inline comments.

================
Comment at: lib/AST/ExprConstant.cpp:6221-6223
@@ +6220,5 @@
+  //
+  //   extern struct X { char buff[32]; int a, b, c; } *p;
+  //   int a = __builtin_object_size(p->buff + 4, 3); // returns 28
+  //   int b = __builtin_object_size(p->buff + 4, 2); // returns 0, not 40
+  //
----------------
rsmith wrote:
> Please add a testcase like this (where the base object is unknown but the 
> designator is known, and thus we can compute the Type == 1 and Type == 3 
> forms but not the Type == 0 and Type == 2 forms).
EvaluatePointer is stricter than I thought -- this is actually not possible 
without adding a decent amount of complexity to the current patch. Will replace 
the comment with a TODO, and add the test case in the next patch that makes us 
support things like this. :)


http://reviews.llvm.org/D12000



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

Reply via email to