<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Apr 2, 2013, at 1:33 AM, Mikołaj Siedlarek <<a href="mailto:m.siedlarek@nctz.net">m.siedlarek@nctz.net</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div>Hi,</div><div><br></div><div>I'm writing a simple code dependency analysis tool using libclang and I'm missing some way of distinguishing system headers from user headers. I see clang::DirectoryLookup::getDirCharacteristic() provides such interface, but is there any way I could obtain this information using just libclang? My tool is rather simple and I'd like to keep it that way - libclang seems to be sufficient for the rest of my needs.</div></div></blockquote><div><br></div><div>There is no way currently, but it should relatively easy, are you interested in providing such a patch ?</div><div>The clang function you may need to look into using is "SourceManager::isInSystemHeader(SourceLocation Loc)"</div><div>The libclang function would accept a CXTranslationUnit and a CXSourceLocation.</div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div><br></div><div>Thanks,</div><div><div>-- </div><div>Mikołaj Siedlarek</div><div><a href="mailto:m.siedlarek@nctz.net">m.siedlarek@nctz.net</a></div><div><br></div></div>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a></div></blockquote></div><br></body></html>