rsmith accepted this revision.
rsmith added a reviewer: rsmith.
rsmith added a comment.
This revision is now accepted and ready to land.

LGTM with one more testcase :)


================
Comment at: lib/AST/ExprConstant.cpp:6243-6245
@@ +6242,5 @@
+  } else if (End.Designator.IsOnePastTheEnd) {
+    // We're already pointing at the end of the object.
+    AmountToAdd = 0;
+  }
+
----------------
rsmith wrote:
> Please add testcases for the pointer-to-the-end case:
> 
>   int n;
>   static_assert(__builtin_object_size(&n + 1, 1) == 0);
> 
>   struct X { int a, b, c; } x;
>   static_assert(__builtin_object_size(&x.a + 1, 1) == 0);
> 
I think you now have a testcase for the end-of-array case, but not the 
end-of-nonarray case.


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