<div dir="ltr">Hi,<div><br></div><div>I don't know how it should be matched, using classOf, dyn_cast, or isa.</div><div><br></div><div>I tried:</div><div><br></div><div>namespace<br>{<br> AST_MATCHER(clang::Stmt, isOffsetOf) { return clang::isa<clang::OffsetOfExpr>(&Node); }<br>}<br></div><div><br></div><div>and still doesn't match.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 12, 2020 at 7:37 PM Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Aug 12, 2020 at 1:52 PM Billy Araujo via cfe-dev<br>
<<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Anyone know how to match OffsetOfExpr?<br>
><br>
> |-FunctionDecl 0x2484fff0298 <line:9:1, line:12:1> line:9:13 used f1 'void ()' static<br>
> | `-CompoundStmt 0x2484fff03c8 <line:10:1, line:12:1><br>
> | `-OffsetOfExpr 0x2484fff0390 <C:\Program Files\LLVM\lib\clang\10.0.0\include\stddef.h:104:24, col:47> 'unsigned long long'<br>
><br>
> In clang-query if I type: m offsetOfExpr() is says: matcher not found.<br>
<br>
We don't currently expose a matcher for it, so that's why it's not<br>
found. It wouldn't be difficult to add a matcher for it, however (feel<br>
free to add me as a review if you decide to author a patch for this).<br>
<br>
~Aaron<br>
<br>
><br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>