================
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
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to