<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">cfe-dev was wrong list may be?<br class=""><div><br class=""><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi to everyone!<div class=""><br class=""></div><div class="">I'm new to clang and libtooling, and I'm making some cheker tool that emits a error if any obj-c variable declaration doesn't have nullability specifier.</div><div class=""><br class=""></div><div class="">I have code like this</div><div class=""><br class=""></div><div class=""><font face="Menlo" color="#001e57" class="">  A* a = [[A alloc] init];</font><div class=""><font face="Menlo" color="#001e57" class="">  B* _Null_unspecified b = [[B alloc] init];</font></div><div class=""><font face="Menlo" color="#001e57" class="">  C* _Nullable c = [[C alloc] init];</font></div><div class=""><font face="Menlo" color="#001e57" class="">  D* _Nonnull d = [[D alloc] init];</font></div><div class=""><br class=""></div>Now, I want to create a matcher to match variables declaration.<br class=""><br class="">Currently I have something like this:<br class=""><font face="Menlo" color="#001e57" class="">StatementMatcher NullUnspecifiedMatcher =</font><div class=""><font face="Menlo" color="#001e57" class="">  declStmt(hasSingleDecl(varDecl(hasType(objcObjectPointerType()))))</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div>There is <font face="Menlo" color="#001e57" class="">objcObjectPointerType()</font> but it matches only <font face="Menlo" color="#001e57" class="">a</font><font color="#001e57" class=""> </font>(is it a bug?). There are some pointers/references matchers, but they don't work on those variable declarations at all. Also, I tried <font color="#001e57" face="Menlo" class="">isAnyPointer()</font> but it works on any pointer, obj-c or not.<br class=""><br class="">I tried <font face="Menlo" color="#001e57" class="">type()</font> to ensure, that I'm doing everything correctly, and it works.<br class=""><br class="">So, how can I match only obj-c variable declarations, with or without nullability specifier? <br class=""><br class="">Thanks for any help!</div></div>_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></div></blockquote></div><br class=""></body></html>