aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM modulo a request for some comments in the code. It makes me sad that we have a max number of bits specified by LLVM that's kinda useless. "You can store this many bits into this integer value, but if you attempt to add 0 to that value, it sometimes breaks" doesn't sound like a useful maximum. :-D
================ Comment at: clang/lib/Sema/SemaType.cpp:2272 - if (NumBits > llvm::IntegerType::MAX_INT_BITS) { - Diag(Loc, diag::err_ext_int_max_size) << IsUnsigned - << llvm::IntegerType::MAX_INT_BITS; + int MaxBits = PowerOf2Floor(llvm::IntegerType::MAX_INT_BITS); + if (NumBits > MaxBits) { ---------------- I'd appreciate some extra comments here explaining why the max int bit width is insufficient. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109714/new/ https://reviews.llvm.org/D109714 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits