nickdesaulniers added a comment.

In D58797#1439888 <https://reviews.llvm.org/D58797#1439888>, @erik.pilkington 
wrote:

> Ah, I didn't consider that case. Presumably `st` is configured to have 
> different sizes based on the target?


Yes; sorry I was not clear about that in my example.

> I agree that this is a false-positive, but it seems like a pretty narrow edge 
> case, and there is a pretty obvious source workaround that doesn't affect 
> readability: `memcpy(&buf, st, sizeof(buf))`.

Oh, yeah, we could make that source level change.

> @aaron.ballman/@rsmith Any thoughts here? IMO keeping this diagnostic is 
> worth it.

I'm all for keeping it, I'm curious if it can be extended to NOT warn in the 
case provided?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58797/new/

https://reviews.llvm.org/D58797



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

Reply via email to