Douglas Gregor wrote:
>
> On Oct 10, 2009, at 5:04 AM, Sebastian Redl wrote:
>> +def err_incompatible_exception_specs : Error<
>> +  "target exception specification is not superset of source">;
>
> It would be nice if we said a little more about what types the target
> is missing in its exception specification, but it's not critical.
I'm still hoping for location information in the types, so that I can
simply make the caret diagnostics point to the types that don't fit.
>
>> +bool Sema::CheckExceptionSpecCompatibility(Expr *From, QualType ToType)
>> +{
>> +  // First we check for applicability.
>> +  // Target type must be a function, function pointer or function
>> reference.
>> +  if (const PointerType *PtrTy = ToType->getAs<PointerType>())
>> +    ToType = PtrTy->getPointeeType();
>> +  else if (const ReferenceType *RefTy = ToType->getAs<ReferenceType>())
>> +    ToType = RefTy->getPointeeType();
>
> Or a member function pointer?
Possibly. I have to check the standard and write a test case.

Thanks for the review.

Sebastian
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to