rsmith accepted this revision. rsmith added a comment. Thanks for your patience.
================ Comment at: clang/lib/Sema/SemaInit.cpp:7838-7854 + if (const auto *FromPtrType = SourceType->getAs<PointerType>()) { + if (const auto *ToPtrType = Step->Type->getAs<PointerType>()) { + if (FromPtrType->getPointeeType()->hasAttr(attr::NoDeref) && + !ToPtrType->getPointeeType()->hasAttr(attr::NoDeref)) { + S.Diag(CurInit.get()->getExprLoc(), + diag::warn_noderef_to_dereferenceable_pointer) + << CurInit.get()->getSourceRange(); ---------------- `CheckSingleAssignmentConstraints` also warns in this case; is the explicit warning emission above necessary? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49511/new/ https://reviews.llvm.org/D49511 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits