================
Comment at: cpp11-migrate/tool/Cpp11Migrate.cpp:237-238
@@ +236,4 @@
+ } else {
+ Compilations.reset(CompilationDatabase::autoDetectFromSource(
+ SourcePaths[0], ErrorMessage));
+ // If no compilation database can be detected from source then we create
----------------
Edwin Vane wrote:
> Guillaume Papin wrote:
> > I believe these lines should be before the else and you still have to check
> > for the emptiness of BuildPath.
> >
> > The `cpp11-migrate -help` says:
> >
> > -p <build-path> is used to read a compile command database.
> >
> > <...>. When no build path is specified, a search for
> > compile_commands.json
> > will be attempted through all parent paths of the first input file .
> Which `else`? If `-p` is not specified, this should be the only time we use
> the source to auto-detect a compilation database. In that case, the logic
> seems right to me...
Wow, my bad. I finally understand how CommonOptionsParser is supposed to work.
I was confused because the autoDetectFromSource behavior is documented under
`-p` but I realize now it has nothing to do with `-p`. I thought it was for
`-p` with an empty argument `cpp11-migrate -p=""`...but it seemed weird.
So you can ignore this comment.
http://llvm-reviews.chandlerc.com/D1337
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits