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

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Nov 5 10:11:41 PST 2020


michaelrj added a comment.

submit comments



================
Comment at: libc/utils/tools/WrapperGen/Main.cpp:51
+
+    if (TypeName.compare("void") == 0) {
+      continue;
----------------
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.


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