nickdesaulniers added inline comments.
================ Comment at: lib/Sema/SemaChecking.cpp:10411 + ->getAs<BuiltinType>(); + if (!ResultBT || !(RBT && RBT->isFloatingPoint())) return; + ---------------- nickdesaulniers wrote: > pirama wrote: > > Add a comment explaining this conditional as well? > > > > > Return if source and target types are unavailable or if source is not a > > > floating point. > > > > With the comment, it might be cleaner to read if you expand the negation: > > `!ResultBT || !RBT || !RBT->isFloatingPoint()` > `ResultBT` and `RBT` are pointers that may be null and need to be checked. > The previous code did this before accessing them, I've just moved the checks > to be sooner. > > If `!RBT` (if it's `nullptr`), then `!RBT->isFloatingPoint()` would be a null > deref, so unfortunately I can not expand it as recommended. oops, nevermind Repository: rC Clang https://reviews.llvm.org/D50467 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits