[cfe-dev] Functions within file context

Eli Friedman eli.friedman at gmail.com
Thu Aug 12 18:18:20 PDT 2010


On Thu, Aug 12, 2010 at 5:50 PM, manavender reddy
<manavender.623 at gmail.com> wrote:
> Hi
> I am new to clang. I want to write  a program to print all the function in a
> C file. I am having a problem, its also printing some functions which are
> included in header files. But i only want to print
> functions which are defined in a given file. Is there any way to find this
> ?

Try SourceManager::isFromMainFile().

-Eli




More information about the cfe-dev mailing list