diff options
author | danakj <danakj@chromium.org> | 2016-01-15 16:37:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-16 00:38:18 +0000 |
commit | ef9f1facc0a913056119850cef66a3e2955252c2 (patch) | |
tree | e0c51bd0d7cd832928987682d5900d823c62cb7f /docs | |
parent | f402ac57b2125147a565f6340b854807ead6aad3 (diff) | |
download | chromium_src-ef9f1facc0a913056119850cef66a3e2955252c2.zip chromium_src-ef9f1facc0a913056119850cef66a3e2955252c2.tar.gz chromium_src-ef9f1facc0a913056119850cef66a3e2955252c2.tar.bz2 |
docs: Fix links/shell with whitespace changes.
Links shouldn't have whitespace inside them, shell snippets
need whitespace around them.
R=dcheng
Review URL: https://codereview.chromium.org/1592883002
Cr-Commit-Position: refs/heads/master@{#369894}
Diffstat (limited to 'docs')
-rw-r--r-- | docs/clang_tool_refactoring.md | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/docs/clang_tool_refactoring.md b/docs/clang_tool_refactoring.md index 6d0409b..2b6c617 100644 --- a/docs/clang_tool_refactoring.md +++ b/docs/clang_tool_refactoring.md @@ -39,16 +39,15 @@ writing a new tool. Chromium clang tools generally follow this pattern: -1. Instantiate a [`clang::ast_matchers::MatchFinder`]( - http://clang.llvm.org/doxygen/classclang_1_1ast__matchers_1_1MatchFinder.html). -2. Call `addMatcher()` to register [`clang::ast_matchers::MatchFinder::MatchCallback`]( - http://clang.llvm.org/doxygen/classclang_1_1ast__matchers_1_1MatchFinder_1_1MatchCallback.html) actions to execute when [matching](http://clang.llvm.org/docs/LibASTMatchersReference.html) the AST. +1. Instantiate a [`clang::ast_matchers::MatchFinder`](http://clang.llvm.org/doxygen/classclang_1_1ast__matchers_1_1MatchFinder.html). +2. Call `addMatcher()` to register [`clang::ast_matchers::MatchFinder::MatchCallback`](http://clang.llvm.org/doxygen/classclang_1_1ast__matchers_1_1MatchFinder_1_1MatchCallback.html) + actions to execute when [matching](http://clang.llvm.org/docs/LibASTMatchersReference.html) + the AST. 3. Create a new `clang::tooling::FrontendActionFactory` from the `MatchFinder`. 4. Run the action across the specified files with [`clang::tooling::ClangTool::run`](http://clang.llvm.org/doxygen/classclang_1_1tooling_1_1ClangTool.html#acec91f63b45ac7ee2d6c94cb9c10dab3). -5. Serialize generated [`clang::tooling::Replacement`]( - http://clang.llvm.org/doxygen/classclang_1_1tooling_1_1Replacement.html)s to - `stdout`. +5. Serialize generated [`clang::tooling::Replacement`](http://clang.llvm.org/doxygen/classclang_1_1tooling_1_1Replacement.html)s + to `stdout`. Other useful references when writing the tool: @@ -85,10 +84,9 @@ TODO: Document more about `SourceLocation` and how spelling loc differs from expansion loc, etc. ### Why not RefactoringTool? -While clang has a [`clang::tooling::RefactoringTool`]( -http://clang.llvm.org/doxygen/classclang_1_1tooling_1_1RefactoringTool.html) to -automatically apply the generated replacements and save the results, it doesn't -work well for Chromium: +While clang has a [`clang::tooling::RefactoringTool`](http://clang.llvm.org/doxygen/classclang_1_1tooling_1_1RefactoringTool.html) +to automatically apply the generated replacements and save the results, it +doesn't work well for Chromium: * Clang tools run actions serially, so runtime scales poorly to tens of thousands of files. @@ -97,10 +95,12 @@ work well for Chromium: ## Building Synopsis: + ```shell tools/clang/scripts/update.py --force-local-build --without-android \ --tools blink_gc_plugin plugins rewrite_to_chrome_style ``` + Running this command builds the [Oilpan plugin](https://chromium.googlesource.com/chromium/src/+/master/tools/clang/blink_gc_plugin/), the [Chrome style plugin](https://chromium.googlesource.com/chromium/src/+/master/tools/clang/plugins/), @@ -112,6 +112,7 @@ Generally, `--tools` should always include `blink_gc_plugin` and `plugins`: othe ## Running First, build all chromium targets to avoid failures due to missing dependecies that are generated as part of the build: + ```shell ninja -C out/Debug ``` |