hokein created this revision. hokein added a reviewer: bkramer. hokein added subscribers: ioeric, cfe-commits.
http://reviews.llvm.org/D20467 Files: docs/include-fixer.rst Index: docs/include-fixer.rst =================================================================== --- docs/include-fixer.rst +++ docs/include-fixer.rst @@ -41,14 +41,16 @@ .. code-block:: console $ cd path/to/llvm-build + $ ninja find-all-symbols // build find-all-symbols tool. + $ ninja clang-include-fixer // build clang-include-fixer tool. $ ls compile_commands.json # Make sure compile_commands.json exists. compile_commands.json $ path/to/llvm/source/tools/clang/tools/extra/include-fixer/find-all-symbols/tool/run-find-all-symbols.py ... wait as clang indexes the code base ... $ ln -s $PWD/find_all_symbols_db.yaml path/to/llvm/source/ # Link database into the source tree. $ ln -s $PWD/compile_commands.json path/to/llvm/source/ # Also link compilation database if it's not there already. $ cd path/to/llvm/source - $ clang-include-fixer -db=yaml path/to/file/with/missing/include.cpp + $ /path/to/clang-include-fixer -db=yaml path/to/file/with/missing/include.cpp Added #include "foo.h" Integrate with Vim @@ -63,6 +65,9 @@ This enables `clang-include-fixer` for NORMAL and VISUAL mode. Change ``,cf`` to another binding if you need clang-include-fixer on a different key. +Make sure the path of :program:`clang-include-fixer` is in the environment PATH +variable. + See ``clang-include-fixer.py`` for more details. How it Works
Index: docs/include-fixer.rst =================================================================== --- docs/include-fixer.rst +++ docs/include-fixer.rst @@ -41,14 +41,16 @@ .. code-block:: console $ cd path/to/llvm-build + $ ninja find-all-symbols // build find-all-symbols tool. + $ ninja clang-include-fixer // build clang-include-fixer tool. $ ls compile_commands.json # Make sure compile_commands.json exists. compile_commands.json $ path/to/llvm/source/tools/clang/tools/extra/include-fixer/find-all-symbols/tool/run-find-all-symbols.py ... wait as clang indexes the code base ... $ ln -s $PWD/find_all_symbols_db.yaml path/to/llvm/source/ # Link database into the source tree. $ ln -s $PWD/compile_commands.json path/to/llvm/source/ # Also link compilation database if it's not there already. $ cd path/to/llvm/source - $ clang-include-fixer -db=yaml path/to/file/with/missing/include.cpp + $ /path/to/clang-include-fixer -db=yaml path/to/file/with/missing/include.cpp Added #include "foo.h" Integrate with Vim @@ -63,6 +65,9 @@ This enables `clang-include-fixer` for NORMAL and VISUAL mode. Change ``,cf`` to another binding if you need clang-include-fixer on a different key. +Make sure the path of :program:`clang-include-fixer` is in the environment PATH +variable. + See ``clang-include-fixer.py`` for more details. How it Works
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits