[PATCH] Use -std=c++11 when no arguments are provided.
Edwin Vane
edwin.vane at intel.com
Tue Aug 13 10:15:43 PDT 2013
================
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
----------------
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...
http://llvm-reviews.chandlerc.com/D1337
More information about the cfe-commits
mailing list