[cfe-dev] cleanup attribute argument checking
Jean-Daniel Dupas
devlists at shadowlab.org
Tue Feb 24 14:30:43 PST 2009
Le 24 févr. 09 à 19:19, Eli Friedman a écrit :
> On Tue, Feb 24, 2009 at 9:39 AM, Jean-Daniel Dupas
> <devlists at shadowlab.org> wrote:
>> // We're currently more strict than GCC about what function types
>> we
>> accept.
>> // If this ever proves to be a problem it should be easy to fix.
>> QualType Ty = S.Context.getPointerType(VD->getType());
>> QualType ParamTy = FD->getParamDecl(0)->getType();
>> if (Ty != ParamTy) {
>
> This should probably be using Sema::CheckAssignmentConstraints or
> something like that.
Thanks. Look like the following condition will do the trick :-)
if (S.CheckAssignmentConstraints(Ty, ParamTy) != Sema::Compatible) {
...
}
More information about the cfe-dev
mailing list