[cfe-dev] ParmVarDecl of CXXConstructorDecl Matcher
Hartogs Siegfried via cfe-dev
cfe-dev at lists.llvm.org
Thu Feb 4 13:34:55 PST 2021
Hello everyone,
How would one write a matcher that looks for ParmVarDecls that don't occur in constructor decls?
I'd figure
parmVarDecl(unless(hasParent(cxxConstructorDecl()))),
but that doesn't work.
Replacing hasParent with hasAncestor seems to work, but looks weird considering ParmVarDecls look like direct children of FunctionDecls in the AST. Is there something special about ParmVarDecls, also since there is the hasAnyParameter matcher?
Thanks!
Sigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210204/758a1947/attachment.html>
More information about the cfe-dev
mailing list