[cfe-dev] Passing argv to loadFromCommandLine

Daniel Dilts diltsman at gmail.com
Wed Apr 15 14:37:57 PDT 2015


I am attempting to call FixedCompilationDatabase::loadFromCommandLine.
Seems pretty straight forward:

FixedCompilationDatabase::loadFromCommandLine(argc, argv);

In VS2013 this gives me an error:

cannot convert argument 2 from 'char *[]' to 'const char **'

I am using the following signature of main (3.6.1/2 C++11 standard):

int main(int argc, char* argv[])

It seems that the compiler should be able to do the conversion implicitly,
but it isn't.  Is this how it is supposed to work?  If it is, should the
signature of loadFromCommandLine change so that argv can be passed directly?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150415/a4427fa1/attachment.html>


More information about the cfe-dev mailing list