Tedlion requested review of this revision.
Tedlion added a comment.

In D146194#4198870 <https://reviews.llvm.org/D146194#4198870>, @steakhal wrote:

> Thanks for looking into this.
>
> I could not reproduce the issue with the following test code:  
> https://godbolt.org/z/hsY9PTKGz
>
>   struct A {
>     unsigned x : 3;
>     unsigned : 29; 
>     unsigned y;
>   };
>   void func1(A a);
>   
>   void func2() {
>     A a = {0};
>     func1(a); // no-warning here on trunk
>   }
>
> I'd recommend adding a test that would demonstrate that before your fix the 
> test would diagnose a FP and after your fix, the FP would disappear.
> Without tests, unfortunately, we cannot accept patches.

Thanks for reviewing. I have tried the code as C++ source, no warning is 
reported. However, clang gives the wrong warning when processing the code as C 
source. Try the following: https://godbolt.org/z/6ET6rnb4z


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146194

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

Reply via email to