The new unit tests demonstrates that without unwrapping ElaboratedType
and TemplateSpecializationType we end up with a somewhat absurd
situation where a ParmVarDecl's type doesn't have *any* associated
declaration.
Fixes PR30331.
Differential D24361
hasDeclaration(qualType(...)) matcher should unwrap ElaboratedType and TemplateSpecializationType lukasza on Sep 8 2016, 12:15 PM. Authored by
Details
Diff Detail Event TimelineComment Actions I am assuming that the expectation I expressed in the unit test is a valid/correct expectation. I guess this is the first thing to validate/ack in the review :-)
Comment Actions Richard, could you please take a look?
Comment Actions
Comment Actions Reverted changes in the patch that are not related to the issue of hasDeclaration not matching *anything* in some cases. |
There is also a question whether I should not only start supporting not only qualType(hasDeclaration(...)) when qualType wraps an ElaboratedType node, but also start supporting elaboratedType(hasDeclaration(...)).
Snippets of a patch that could achieve this (but then again - I am not sure if this is desirable and/or necessary):