Bekket McClane via llvm-dev
2017-Jun-03 13:00 UTC
[llvm-dev] [CommandLine] Missing clEnumValEnd for cl::values in tutorial page
Hi, The argument list for cl::values in command line library should be end with null or clEnumValEnd. But the tutorial page(http://llvm.org/docs/CommandLine.html <http://llvm.org/docs/CommandLine.html>) doesn’t follow the rule, which would cause program crash during runtime. I’d send a code review: https://reviews.llvm.org/D33861 <https://reviews.llvm.org/D33861> Please cc other folks related to this part. Best Regards, Bekket McClane -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170603/5b579509/attachment.html>
Bekket McClane via llvm-dev
2017-Jun-06 01:53 UTC
[llvm-dev] [CommandLine] Missing clEnumValEnd for cl::values in tutorial page
Hi, Can anyone help reviewing the code? I think this revision is pretty important regarding that the command line library is also used in many non-LLVM projects. It’s nice to provide a correct guideline to whom use the library for the first time. B.R McClane> Bekket McClane <bekket.mcclane at gmail.com> 於 2017年6月3日 下午9:00 寫道: > > Hi, > > The argument list for cl::values in command line library should be end with null or clEnumValEnd. But the tutorial page(http://llvm.org/docs/CommandLine.html <http://llvm.org/docs/CommandLine.html>) doesn’t follow the rule, which would cause program crash during runtime. > > I’d send a code review: https://reviews.llvm.org/D33861 <https://reviews.llvm.org/D33861> > Please cc other folks related to this part. > > Best Regards, > Bekket McClane-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170606/806f20d7/attachment.html>
陳韋任 via llvm-dev
2017-Jun-06 13:15 UTC
[llvm-dev] [CommandLine] Missing clEnumValEnd for cl::values in tutorial page
Hi Bekket, 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 clEnumValEnd. Do I miss something here? [1] http://llvm.org/doxygen/DwarfDebug_8cpp_source.html Regards, chenwj 2017-06-06 9:53 GMT+08:00 Bekket McClane via llvm-dev < llvm-dev at lists.llvm.org>:> Hi, > > Can anyone help reviewing the code? > I think this revision is pretty important regarding that the command line > library is also used in many non-LLVM projects. > It’s nice to provide a correct guideline to whom use the library for the > first time. > > B.R > McClane > > Bekket McClane <bekket.mcclane at gmail.com> 於 2017年6月3日 下午9:00 寫道: > > Hi, > > The argument list for cl::values in command line library should be end > with null or clEnumValEnd. But the tutorial page(http://llvm.org/docs/ > CommandLine.html) doesn’t follow the rule, which would cause program > crash during runtime. > > I’d send a code review: https://reviews.llvm.org/D33861 > Please cc other folks related to this part. > > Best Regards, > Bekket McClane > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-- Wei-Ren Chen (陳韋任) Homepage: https://people.cs.nctu.edu.tw/~chenwj -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170606/88b834f3/attachment.html>