[cfe-dev] how to know if a class/function are declared in an include hearder file ?

ogzu rasa via cfe-dev cfe-dev at lists.llvm.org
Sat Feb 17 13:33:50 PST 2018


Hello,
I develop a source-to-source project for fun and to learn clang. The idea
is to generate an xml of a function or class declared in a header file
which is an input of my program. But if this header file has an #include
directive the code generate also an xml for functions/classes declared in
this one and i would like to avoid it.

There exist a way to know in which file a clang::Decl object is declared ?

SourceManager::getFileName returns my input file so i can't compare file
name.

Thanks in advance,
karpalo.

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180217/f747e1ad/attachment.html>


More information about the cfe-dev mailing list