[libc-commits] [PATCH] D90800: [libc] Fix WrapperGen seeing no arguments as a void argument.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Nov 5 10:15:49 PST 2020


sivachandra added inline comments.


================
Comment at: libc/utils/tools/WrapperGen/Main.cpp:51
+
+    if (TypeName.compare("void") == 0) {
+      continue;
----------------
michaelrj wrote:
> sivachandra wrote:
> > May be check that the ArgsList.size() is zero? If zero, `break` out of the for loop, else report a descriptive error?
> ArgsList.size() is still 1 if there are no arguments, that's where the argument of type void is coming from. If ArgsList.size() was ever 0 it wouldn't even enter the `for` loop, as that's the check at the top. I did change the `continue` to a `break` though.
Sorry! I intended to say, when you find a `void` arg type, check that `ArgsList.size() == 1`. If not, report a descriptive error.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90800/new/

https://reviews.llvm.org/D90800



More information about the libc-commits mailing list