================ Comment at: docs/MigratorUsage.rst:34-40 @@ -33,9 +33,9 @@ ``<build-path>`` is the directory containing a file named ``compile_commands.json`` which provides compiler arguments for building each source file. CMake can generate this file by specifying ``-DCMAKE_EXPORT_COMPILE_COMMANDS`` when running CMake. Ninja_, since v1.2 can also generate this file with ``ninja -t compdb``. If ``<build-path>`` is not provided the ``compile_commands.json`` file is searched for through all parent directories. ---------------- Edwin Vane wrote: > This paragraph is not quite right now. First of all, the argument is now > required if `-p` is used so get rid ofthe []. Here is a suggested rewording: > > ``<build-path>`` is the directory containing a *compilation databasefile*, > a file named ``compile_commands.json``, which provides > compiler arguments for building each source file. CMake can generate this > file by specifying > ``-CMAKE_EXPORT_COMPILE_COMMANDS`` when running CMake. Ninja_, since v1.2 > can also generate this file with ``ninja -t > compdb``. If the compilation database cannot be used for any reason, an > error is reported. Yes you are right. Since we didn't add cl::ValueOptional -p should have an explicit build-path or it will take the first source location as a build path.
================ Comment at: docs/MigratorUsage.rst:50-53 @@ +49,6 @@ + + If ``--`` and ``-p`` are not specified then a compilation database is searched + based on the path of the first source file. If no compilation database is + found or for any reason can't be used then ``-std=c++11`` is used as the only + compilation option. + ---------------- Edwin Vane wrote: > If *neither* ``--`` *nor* ``-p`` are specified a compilation database is > searched **for** starting with the path of the first-provided source file and > proceeding through parent > directories. If no compilation database is found or one is found and cannot > be used for any reason then ``-std=c++11`` is used as the only compiler > argument. yes much better ================ Comment at: docs/cpp11-migrate.rst:44 @@ -43,3 +43,3 @@ arguments, it might be easier to pass the compiler args on the command line -after ``--``. If you're working with multiple files or even a single file -with many compiler args, it's probably best to use a *compilation database*. +after ``--``. If you don't have any compiler argument then ``--`` is not needed. +If you're working with multiple files or even a single file with many compiler ---------------- Edwin Vane wrote: > If you con't have any compiler arguments then ... fixed. http://llvm-reviews.chandlerc.com/D1337 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
