[PATCH] Added function to CommonOptionsParser to verify -- was included in the command line.

Bernal, Ariel J ariel.j.bernal at intel.com
Wed Aug 7 15:51:27 PDT 2013


Manuel,

I would like to append -std=c++11 to the compilation arguments in case the user has specified a source path or -- without  arguments, then if you run the migrator more than once it doesn't fail.

In the following cases c++11 support will be added

cpp11-migrate -use-nullptr  file.cpp
cpp11-migrate -use-nullptr  file.cpp   -- -I include_dir

but not in this case

cpp11-migrate -use-nullptr  -p compilation.json

The problem is that once the arguments are parsed I can't check if they come from a json file, from a source path or a fixcompilationdatabase --

Do you think there's another way to achieve the same without changing CommonOptionsParser?

Thanks

Ariel


From: Manuel Klimek [mailto:klimek at google.com]
Sent: Wednesday, August 07, 2013 3:07 PM
To: reviews+D1312+public+c404da01ae6da218 at llvm-reviews.chandlerc.com
Cc: Vane, Edwin; Siraj, Tareq A; Guillaume Papin; Bernal, Ariel J; cfe-commits at cs.uiuc.edu
Subject: Re: [PATCH] Added function to CommonOptionsParser to verify -- was included in the command line.

Can I ask which use case in the tool you're addressing? Thanks!

On Wed, Aug 7, 2013 at 10:45 AM, Ariel Bernal <ariel.j.bernal at intel.com<mailto:ariel.j.bernal at intel.com>> wrote:

  I also need to verify if Compilations come from SourcePath too.

http://llvm-reviews.chandlerc.com/D1312

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130807/a4fb6fe0/attachment.html>


More information about the cfe-commits mailing list