[cfe-dev] ast matchers, structDecl, unionDecl missing? recordDecl is only for CXXRecordDecl

Samuel Benzaquen sbenza at google.com
Wed Jan 7 09:19:54 PST 2015


On Tue, Jan 6, 2015 at 9:07 PM, mobi phil <mobi at mobiphil.com> wrote:

>
>> Well, was not trying to find out the the "real" type as obviously the
>> real type is hidden in the ast itself and that is not known when the
>> matcher is being constructed. I am interested indeed in the RestrictedType,
>> Will give a try in few days and report.
>>
>>
> do not remember exactly, but maybe the reason I did not dig into
> RestrictedKind is there is no get-er (getRestrictedKind()). Can we trade
> the bug I found versus asking to implement it? ;)
>

There is no getRestrictKind() because this is a new implementation detail
and I've tried to keep it as such.
For example, recently I needed this information for an optimization and
added DynTypedMatcher::canMatchNodesOfKind() instead of exposing
RestrictKind directly.
If there is a good reason to make it part of the API, we can do that.
_Sam


>
>  regards
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150107/dd70ad64/attachment.html>


More information about the cfe-dev mailing list