<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Sorry for another post.<br><br>I make another test using c-index-test, and get a similar result.<br>//run<br>./c-index-test -cursor-at=/home/lucency/Study/source/lua/src/lcode.c:45:21 /home/lucency/Study/source/lua/src/lcode.c -I/home/lucency/Study/source/lua/src/<br><br>//result<br>UnexposedStmt=<br><br>Do i miss something?<br><br>PS. <br>1.c-index-code is built about ten days ago using code checkout from svn.<br>2.As you can see, the test input files come from lua.<br><br>--- <b>11年1月25日,周二, Douglas Gregor <i><dgregor@apple.com></i></b> 写道:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>发件人: Douglas Gregor <dgregor@apple.com><br>主题: Re: [cfe-dev] How to get symbol's info. when the symbol is in macro instantiation<br>收件人: "jiyang zhao"
<zjyzhaojiyang@yahoo.com.cn><br>抄送: cfe-dev@cs.uiuc.edu<br>日期: 2011年1月25日,周二,下午11:53<br><br><div id="yiv780613958"><br>On Jan 25, 2011, at 12:30 AM, jiyang zhao wrote:<br><br><blockquote type="cite">Hi list<br>I meet a problem about macro when using libclang, when i want to get a viriable's infomation which is in a macro instantiation, for example, its linkage kind, i get 200(UnexposedStmt), is this the expected result? If so, how can i get the exact information of the symbol(e.g. previous in following code, SETARG_B is macro)?<br><br>//example<br>SETARG_B(*previous, from+n-1);<br><br>Thanks<br></blockquote><br>This reference to previous will show up as a CXCursor_DeclRefExpr cursor. You can then use clang_getCursorReferenced() to find the declaration that the cursor points to.<div><br></div><div><span class="yiv780613958Apple-tab-span" style="white-space: pre;"> </span>-
Doug<br><br></div></div></blockquote></td></tr></table><br>