lebedev.ri added inline comments.
================ Comment at: lib/Sema/SemaChecking.cpp:8719 + // Type limit values are handled later by CheckTautologicalComparison(). + if (IsTypeLimit(S, Other, Constant, ConstValue) && (!OtherIsBooleanType)) return; ---------------- rsmith wrote: > Is this necessary? (Aren't the type limit values always within the range of > the type in question?) > > Can we avoid evaluating `Constant` a extra time here? (We already have its > value in `Value`.) Uhm, good question :) If i remove this, `check-clang-sema` and `check-clang-semacxx` still pass. I agree that it does not make much sense. Initially it was only checking for `Value == 0`. Git suggests that initially this branch was added by @rtrieu, maybe can help. Repository: rL LLVM https://reviews.llvm.org/D38101 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits