[PATCH] D15486: [RFC] Emit note pointing to a discarded qualifier [-Wincompatible-pointer-types-discards-qualifiers]
Adrian ZgorzaĆek via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 14 17:47:13 PST 2015
adek05 added inline comments.
================
Comment at: lib/Sema/SemaPseudoObject.cpp:739-751
@@ -738,15 +738,15 @@
// C++ class type.
if (!S.getLangOpts().CPlusPlus || !op->getType()->isRecordType()) {
QualType paramType = (*Setter->param_begin())->getType()
.substObjCMemberType(
receiverType,
Setter->getDeclContext(),
ObjCSubstitutionContext::Parameter);
if (!S.getLangOpts().CPlusPlus || !paramType->isRecordType()) {
ExprResult opResult = op;
Sema::AssignConvertType assignResult
= S.CheckSingleAssignmentConstraints(paramType, opResult);
- if (S.DiagnoseAssignmentResult(assignResult, opcLoc, paramType,
+ if (S.DiagnoseAssignmentResult(assignResult, opcLoc, paramType, nullptr,
op->getType(), opResult.get(),
Sema::AA_Assigning))
return ExprError();
----------------
This is the place which I suspect may trigger this warning, but I need to read the code more careful to come up with an example.
http://reviews.llvm.org/D15486
More information about the cfe-commits
mailing list