<div dir="ltr"><div>Hi,</div><div><br></div><div>i use libclang and i want to know is if-statement really in macros or not in following code:</div><div><br></div><div>#define SOME_MACROS<span class="" style="white-space:pre"> </span>if(a) a++;<span class="" style="white-space:pre"> </span> </div>
<div>void foo() {</div><div> int a=1;</div><div> SOME_MACROS</div><div>}</div><div><br></div><div>My code:</div><div>CXChildVisitResult handleVisitChildren(CXCursor cursor, CXCursor parent, CXClientData dt) {</div><div>
if ( clang_getCursorKind(cursor) == CXCursor_IfStmt ) {</div><div> // how find out, that this cursor located in macros</div><div> }</div><div>}</div><div><br></div><div>Thanks</div></div>