[cfe-dev] Fix to the exception specifications type checking
Douglas Gregor
dgregor at apple.com
Tue Dec 8 13:01:12 PST 2009
On Dec 8, 2009, at 12:25 PM, Nicola Gigante wrote:
> Hello again!
>
> Douglas pointed me to a FIXME comment in SemaExceptionSpec.cpp that
> would be interesting to fix. In practice this would allow the last
> line of test/SemaCXX/exception-spec.cpp to compile (it's commented
> now).
>
> I don't know very well how are the various clang classes, types
> etc... (and I'm learning) so I ask some questions:
>
> To fix this bug I need to modify the
> Sema::CheckSpecifiedExceptionType method to check if the specified
> type is the class that contains the exception specification itself.
> How do I obtain this class name? I think an additional parameter
> from the caller is required. In this case the caller is
> Sema::GetTypeForDeclarator. So I think I could get the class from
> the Declarator object? How?
There's an easier way to tell if a type is being defined. RecordType
has an isBeingDefined() function that will tell you if that type is
currently being defined.
- Doug
More information about the cfe-dev
mailing list