leonardchan added inline comments.

================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1032
+      // them.
+      return Builder.CreateIsNotNull(Src);
+    }
----------------
ebevhan wrote:
> Is this comment true? I don't think EmitFixedPointConversion does this.
> 
> Maybe I'm misinterpreting what it means.
Ah sorry, this was my bad. I briefly forgot that we intended for overflow into 
the bit to be undefined behavior. In that case, this comment doesn't make sense 
and should be removed, but we still shouldn't have to clear/check the padding 
bit in this case because we should assume it's zero'd.

So this refers to handling when the padding bit needs to be cleared since if we 
ever have an operation that reads the whole int of an underlying unsigned type. 
I accidentally wrote this comment thinking that it would be cleared/zero'd at 
some point when we decided before that overflow into this padding was just 
undefined behavior. Updated the comment to reflect this.


Repository:
  rC Clang

https://reviews.llvm.org/D53308



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

Reply via email to