<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;" class="">Hi chenwj,<div class=""><br class=""></div><div class="">Thanks for you reminding, It turns out that the function prototype of cl::values had just changed between 4.x and the current trunk(5.x), and the current version is not null terminated anymore. </div><div class="">(The online reference page <a href="http://llvm.org/docs/doxygen/html/CommandLine_8h.html" class="">http://llvm.org/docs/doxygen/html/CommandLine_8h.html</a> is based on 4.x)</div><div class="">In another word, version of the tutorial page seems to be later than that of the reference page</div><div class="">I would close the issue later</div><div class=""><br class=""></div><div class="">Best Regards,</div><div class="">McClane</div><div class=""><div><blockquote type="cite" class=""><div class="">陳韋任 <<a href="mailto:chenwj.cs97g@g2.nctu.edu.tw" class="">chenwj.cs97g@g2.nctu.edu.tw</a>> 於 2017年6月6日 下午9:15 寫道:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Bekket,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">  I don't see any use case in the codebase adding clEnumValEnd at the end of list (for example, [1]), I also don't see there is</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">clEnumValEnd. Do I miss something here?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">[1] <a href="http://llvm.org/doxygen/DwarfDebug_8cpp_source.html" class="">http://llvm.org/doxygen/DwarfDebug_8cpp_source.html</a></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">chenwj</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-06-06 9:53 GMT+08:00 Bekket McClane via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi,<div class=""><br class=""></div><div class="">Can anyone help reviewing the code?</div><div class="">I think this revision is pretty important regarding that the command line library is also used in many non-LLVM projects.</div><div class="">It’s nice to provide a correct guideline to whom use the library for the first time.</div><div class=""><br class=""></div><div class="">B.R</div><div class="">McClane<br class=""><div class=""><blockquote type="cite" class=""><div class="">Bekket McClane <<a href="mailto:bekket.mcclane@gmail.com" target="_blank" class="">bekket.mcclane@gmail.com</a>> 於 2017年6月3日 下午9:00 寫道:</div><br class="m_-966080896849615807Apple-interchange-newline"><div class=""><div style="word-wrap:break-word" class="">Hi,<div class=""><br class=""></div><div class="">The argument list for cl::values in command line library should be end with null or clEnumValEnd. But the tutorial page(<a href="http://llvm.org/docs/CommandLine.html" target="_blank" class="">http://llvm.org/docs/<wbr class="">CommandLine.html</a>) doesn’t follow the rule, which would cause program crash during runtime.</div><div class=""><br class=""></div><div class="">I’d send a code review: <a href="https://reviews.llvm.org/D33861" target="_blank" class="">https://reviews.llvm.<wbr class="">org/D33861</a></div><div class="">Please cc other folks related to this part.</div><div class=""><br class=""></div><div class="">Best Regards,</div><div class="">Bekket McClane</div></div></div></blockquote></div><br class=""></div></div><br class="">______________________________<wbr class="">_________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-dev</a><br class="">
<br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class="">Wei-Ren Chen (陳韋任)<br class="">Homepage: <a href="https://people.cs.nctu.edu.tw/~chenwj" target="_blank" class="">https://people.cs.nctu.edu.tw/~chenwj</a></div></div></div>
</div>
</div></blockquote></div><br class=""></div></body></html>