lebedev.ri added a comment. I don't think this makes much sense.
In https://reviews.llvm.org/D52137#1236011, @xbolva00 wrote: > /home/xbolva00/LLVM/build/lib/clang/8.0.0/include/bmiintrin.h:312:16: error: > unary minus operator applied to type 'unsigned long long', result value is > still unsigned > > return __X & -__X; > > > @RKSimon what do you think? valid? https://godbolt.org/z/2n3lQp <- i'm not sure why the second one is better, how how the first one is broken. ================ Comment at: lib/Sema/SemaExpr.cpp:12651 + if (Opc == UO_Minus && resultType->isUnsignedIntegerType()) + return ExprError(Diag(OpLoc, diag::err_unsignedtypecheck_unary_minus) + << resultType << Input.get()->getSourceRange()); ---------------- Why is this an error? https://reviews.llvm.org/D52137 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits