https://llvm.org/bugs/show_bug.cgi?id=29054
Bug ID: 29054 Summary: clang api gets confused by positional arguments Product: clang Version: 3.9 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Driver Assignee: unassignedclangb...@nondot.org Reporter: moritz.kie...@purelyfunctional.org CC: llvm-bugs@lists.llvm.org Classification: Unclassified Steps to reproduce: Download and compile https://gist.github.com/cocreature/5b511b3de6f2e2e2e08e48ec3ce25dcc and try to run it with a single argument. That file identical to the clang-interpreter example with the exception of one (unused) positional argument added via llvm::cl (and some debug output). Then try to run it and pass an arbitrary C file as the single argument. Expected: It compiles to an LLVM module and then tries to interpret it. Actual behavior: The call to CompilerInstance::ExecuteAction fails with the following error message: clang: Not enough positional command line arguments specified! Must specify at least 1 positional arguments: See: clang -help Comments: Adding an unused argument is obviously not useful but I am encountering this bug in a tool of mine where we actually use positional arguments so just removing them is not an option (or would require us to switch to a different cli arg parser). This is new behavior in 3.9 (3.8 works fine). I assume it is not intended, but if so, is there a way around this? -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs