<div dir="ltr"><div><div class="gmail-gs" style="margin:0px;padding:0px 0px 20px;width:1004px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div class="gmail-"><div id="gmail-:sx" class="gmail-ii gmail-gt" style="font-size:0.875rem;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="gmail-:sw" class="gmail-a3s gmail-aXjCH" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px"><div style="margin:0px 0px 8px"><p style="margin:0px">Hi! </p><p style="margin:0px"><br></p><p style="margin:0px">First of all, thank you for all the work on LLVM. I've been playing with libclang for a while and it's been an enjoyable experience.</p><p style="margin:0px"><br></p><p style="margin:0px">I'm using libclang to build cross-references for a C++ codebase. I use the `clang_indexTranslationUnit` API, which works very well, but unfortunately</p><p style="margin:0px">reports declarations and references that are coming from macro expansions.</p><p style="margin:0px"><br></p><p style="margin:0px">Now, declarations and references from macro expansions don't really have locations in source code, so I'd love to ignore them.</p><p style="margin:0px"><br></p><p style="margin:0px">My questions are:</p><p style="margin:0px">- Is there a way to detect declarations and references from macro expansions?</p><p style="margin:0px">- If not, shall I switch to `clang_visitChildren` API instead?</p><p style="margin:0px">- Alternatively, would it be a good idea for me to try contributing a new `CXIndexOpt_IgnoreMacroExpansions` option to the API?</p><p style="margin:0px"><br></p><p style="margin:0px">Thanks,</p><p style="margin:0px"><a></a>Andrey</p><div class="gmail-yj6qo"></div><div class="gmail-adL"><p></p></div></div></span></div></div></div><div class="gmail-adL"></div></div></div><div class="gmail-hi" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px;padding:0px;width:auto;background:rgb(242,242,242);margin:0px"></div></div></div>P.S. I tried writing to <span style="font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px"><a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>, but was advised to write here instead. Please let me know if this is not the best list for this type of question.</span></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px"><div style="margin-top:0px;margin-right:0px;margin-bottom:8px;margin-left:0px"><p></p></div></span></div></div></div></div>