aaron.ballman added inline comments.
================ Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:108-113 + if (T.isSignedInteger()) + return {llvm::APSInt::getMinValue(Context.getTypeSize(&T), false), + llvm::APSInt::getMaxValue(Context.getTypeSize(&T), false)}; + assert(T.isUnsignedInteger() && "Unhandled BuiltinType"); + return {llvm::APSInt::getMinValue(Context.getTypeSize(&T), true), + llvm::APSInt::getMaxValue(Context.getTypeSize(&T), true)}; ---------------- This can be further simplified into: ``` assert(T.isInteger() && "Unexpected builtin type"); return {llvm::APSInt::getMinValue(Context.getTypeSize(&T), T.isUnsignedInteger()), llvm::APSInt::getMaxValue(Context.getTypeSize(&T), T.isUnsignedInteger())}; ``` ================ Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:313 + // We create variables so we make sure both sides of the + // ConditionalOperator are evaluated, the || operator would shortciruit + // the second call otherwise. ---------------- shortciruit -> short circuit Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53488 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits