It's a little more complicated than that, I'm afraid. PrintFunctionNames is a plugin, so it doesn't get compiled inside clang; you have to pass command line arguments to clang to tell it where to find the plugin and to load it. There's a minimal tutorial for how to do something very similar to what you want here <<a href="https://github.com/chisophugis/clang_plugin_example">https://github.com/chisophugis/clang_plugin_example</a>>.<div>
<br></div><div>The key thing is the program `invocation_builder.py` which generates command line arguments that will cause clang to load the plugin. Then you will just need to add those arguments to CFLAGS or CXXFLAGS in your makefile.</div>
<div><br></div><div>Btw if you find anything lacking in that example plugin or not well explained, please let me know! I'm trying to improve it so that it is as understandable as possible.</div><div><br></div><div>--Sean Silva<br>
<br><div class="gmail_quote">On Sun, Feb 26, 2012 at 11:22 PM, akshay ratnaparkhi <span dir="ltr"><<a href="mailto:ackk007@gmail.com">ackk007@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to print the function names in the input c or c++ file. I wrote a code for that having class 'PrintFunctionNames'. Now I want to build that code with the clang's source code and when I compile the c or c++ input file with 'clang ' command my code should be automatically execute with compilation and prints the function names. means I want to write the driver option like -o,-c etc to run my code. How can I do that?<div>

<br></div>
<br>_______________________________________________<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" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>