aaron.ballman added inline comments.

================
Comment at: lib/Sema/SemaExpr.cpp:11067
+
+  // Do not diagnose 2 ^ 64, but allow special case (2 ^ 64) - 1.
+  if (SubLHS && SubRHS && (LeftSideValue != 2 || RightSideValue != 64))
----------------
aaron.ballman wrote:
> This comment explains what the code does, but not why it does it. Given that 
> we're adding special cases, I think more comments here explaining why this is 
> valuable would be appreciated.
Thank you, the comments helped! But they also raised another question for me. 
What's special about 2^64? Why not (2^16) - 1 or other common power-of-two 
values? I would have expected 8, 16, 32, and 64 to be handled similarly.


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

https://reviews.llvm.org/D66397



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

Reply via email to