hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land.
LGTM ================ Comment at: clangd/ClangdUnit.cpp:425 + const uint32_t SignBit = ~(~uint32_t{0} >> 1); + return U & SignBit ? 0 - U : U + SignBit; + } ---------------- sammccall wrote: > hokein wrote: > > U ^ SignBit > This matches my old explanation but isn't correct for sign-magnitude. Well, I see! You are right. The implement is **correct** here. https://reviews.llvm.org/D40089 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits