<div dir="ltr">This is great. I can simply use the command line option. Thank you so much. <div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 16, 2015 at 1:26 AM, James Dennett <span dir="ltr"><<a href="mailto:james.dennett@gmail.com" target="_blank">james.dennett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, Oct 16, 2015 at 1:16 AM, Chengnian Sun <span dir="ltr"><<a href="mailto:chengniansun@gmail.com" target="_blank">chengniansun@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Thank you for your reply. The comment is very simple. Each function definition has a preceding comment, listing all the global variables used in the function definition. I need to parse this comment to get the variable list. <div><br></div><div>Yes, I actually found another old post mentioning <span style="font-size:12.8px">CommentOptions::</span><span style="font-size:12.8px">ParseAllComments. However I am new to LLVM/Clang, and I found out it was just a structure defined in CommentOptions.h if I am not wrong. </span></div><div><br></div></div></blockquote><div><br></div></span><div>CommentOptions is indeed just a class, and ParseAllComments a field in it.  It's normally set by this code from lib/Frontend/CompilerInvocation.cpp:</div><div><br></div><div><font face="monospace, monospace">static void ParseCommentArgs(CommentOptions &Opts, ArgList &Args) {<br>  Opts.BlockCommandNames = Args.getAllArgValues(OPT_fcomment_block_commands);<br>  Opts.ParseAllComments = Args.hasArg(OPT_fparse_all_comments);<br>}</font></div><div><br></div><div>i.e., you can set it using a command line argument <span style="color:rgb(136,0,0);font-size:medium;line-height:16.25px">-fparse-all-comments</span> if that's how you're configuring your tool.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- James</div><div><br></div></font></span></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Best Regards.<br><br>Chengnian SUN.</div>
</div>