This revision was automatically updated to reflect the committed changes.
arphaman marked 2 inline comments as done.
Closed by commit rC321222: Fix an assertion failure regression in
isDesignatorAtObjectEnd for (authored by arphaman, committed by ).
Changed prior to commit:
https://reviews.llvm
arphaman added a comment.
In https://reviews.llvm.org/D41405#960008, @george.burgess.iv wrote:
> LGTM assuming my nit gets addressed.
>
> Thank you!
>
> > Maybe someone who's more familiar with this builtin could point to the
> > cause of this discrepancy
>
> Yeah, the documentation for this bui
george.burgess.iv added inline comments.
Comment at: test/Sema/builtin-object-size.c:105
+void rd36094951_IAS_builtin_object_size_assertion(IncompleteArrayStruct* p) {
+ __builtin___strlcpy_chk (p->session[0].string, "ab", 2,
__builtin_object_size(p->session[0].string, 1));
+}
vsapsai added inline comments.
Comment at: test/Sema/builtin-object-size.c:105
+void rd36094951_IAS_builtin_object_size_assertion(IncompleteArrayStruct* p) {
+ __builtin___strlcpy_chk (p->session[0].string, "ab", 2,
__builtin_object_size(p->session[0].string, 1));
+}
-
george.burgess.iv accepted this revision.
george.burgess.iv added a comment.
This revision is now accepted and ready to land.
LGTM assuming my nit gets addressed.
Thank you!
> Maybe someone who's more familiar with this builtin could point to the cause
> of this discrepancy
Yeah, the documenta
arphaman added a comment.
Note that even though there is a discrepancy between GCC and Clang, this patch
does not change Clang's behavior in this instance as it emitted -1 previously
as well
Repository:
rC Clang
https://reviews.llvm.org/D41405
arphaman created this revision.
arphaman added reviewers: vsapsai, rsmith, george.burgess.iv.
The commit r316245 introduced a regression that causes an assertion failure
when Clang tries to cast an `IncompleteArrayType` to a `PointerType` when
evaluating __builtin_object_size in this sample: