- Add an easier-to-use command for AST dumping.
- Update caveats to note that it doesn't work for jumbo builds.
- Remove caveat to use git, since it's more-or-less assumed.
- Use reference style links to make the actual text easier to edit.
Change-Id: I25bd7461ccc9fc4910fe0ef18b01e32a37023530
Reviewed-on: https://chromium-review.googlesource.com/734480
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510989}
This change adds a value rewriter to the value_cleanup clang tool. It is
intended to be extended for future use cases, currently it supports the
renaming of base::Value::GetType to base::Value::type.
Furthermore, this change removes the existing ListValueRewriters which
became obsolete with r464866. For future discoverability it adds a
reference to //docs/clang_tool_refactoring.md.
Bug: 646113, 581865
Change-Id: I07b5c1279753a65c123ebdd4a5c5f3a384321081
Reviewed-on: https://chromium-review.googlesource.com/702454
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508932}
The CL also adds a sentence to the documentation for clang tools, to supply a
bit which was unclear for me during writing of the added tool.
So far, on Linux, the tool found instances of std::move(raw ptr) in:
../../components/browser_sync/profile_sync_service.cc:10101
../../components/sync_sessions/sessions_sync_manager.cc:5987
../../content/browser/indexed_db/indexed_db_transaction.cc:3865
../../gpu/ipc/service/gpu_channel.cc:26467
../../services/preferences/tracked/pref_hash_store_impl.cc:3329
../../services/preferences/tracked/pref_hash_store_impl.cc:4518
../../services/ui/public/cpp/bitmap/child_shared_bitmap_manager.cc:5009
../../services/video_capture/test/mock_device_factory.cc:2266
It also found it in some 3rd party headers, such as
../../third_party/flatbuffers/src/include/flatbuffers/flatbuffers.h:8260
../../third_party/skia/include/core/SkCanvas.h:14756
../../third_party/webrtc/api/proxy.h:16937
../../third_party/webrtc/api/proxy.h:19681
../../third_party/webrtc/api/proxy.h:20241
and c++ libs.
The Chromium 1st party instances will be addressed in separate CLs. For the headers, I'll consider if it makes sense to address this (e.g., some occurrences seem to be template instantiations, where the template is not a priori aware that the supplied type is a raw pointer; in such cases std::move should stay).
I may also run the tool on more platforms.
Finally, while preventing regressions would be good, it seems impractical to run this tool as a presubmit check. However, I will try to run it after https://crbug.com/646113 is finished, because that base::Value refactoring might introduce some instances (happened to me recently).
BUG=729393,731577
Review-Url: https://codereview.chromium.org/2919243002
Cr-Commit-Position: refs/heads/master@{#478226}
- all: Use -p consistently to specify a path to the compile db to match
the convention of clang::tooling::ClangTool
- all: Default -p to out/Debug for convenience.
- docs: Update docs to reference renamed arguments
- docs: Update clang-tidy documentation to use the compile DB generation
wrapper script
- run_tool.py: Change tool to a non-positional argument and make it a
required argument.
Change-Id: I378402cab36e86da4b13fb43e26067cad4db1795
Reviewed-on: https://chromium-review.googlesource.com/494946
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#469409}
plugins and blink_gc_plugin are always mandatory for Chromium builds,
so just always include them. In order to avoid breaking codesearch
bots, --tools is now a synonym for --extra-tools and will be removed.
BUG=none
Review-Url: https://codereview.chromium.org/2609683002
Cr-Commit-Position: refs/heads/master@{#441601}
The split will allow generation of edits on multiple configs (e.g. linux
vs windows OR rel vs dbg) and merging the edits before applying them once:
$ tools/clang/scripts/run_tool.py rewrite_to_chrome_style \
--generate-compdb --all out/rel >run_tool.linux.rel.out
$ ...
$ cat run_tool.*.out \
| tools/clang/scripts/extract_edits.py \
| tools/clang/scripts/apply_edits.py
--generate-compdb --all out/rel >run_tool.linux.rel.out
Test steps:
- tools/clang/translation_unit/test_translation_unit.py
- tools/clang/scripts/test_tool.py rewrite_to_chrome_style
- manually running run_tool | extract_edits | apply_edits pipeline
on WTF and verifying that it still builds after the rename
BUG=598138
TEST=See "Test steps" above.
Review-Url: https://codereview.chromium.org/2599193002
Cr-Commit-Position: refs/heads/master@{#440881}
This includes spelling mistakes like:
accomodate->accommodate
ommited->omitted
unuseable->unusable
dependant->dependent
enviroment->environment
preceed->precede
occurrance->occurrence
occurrances->occurrences
intergrated->integrated
altough->although
appriopriate->appropriate
corresponing->corresponding
dependecies->dependencies
leniant->lenient
overriden->overridden
persisten->persistent
specifyinhg->specifying
As well as capitalization changes like:
javascript->JavaScript
Webkit->WebKit
linux->Linux
A couple other minor things:
the the -> the
trybot -> try bot
etc.
Review-Url: https://codereview.chromium.org/2551513002
Cr-Commit-Position: refs/heads/master@{#436046}
This lets us build the clang tools with clang not gcc, which appears to
have bugs!
Also work around the gcc bug in one place we know it happens anyways,
just because.
R=dcheng
BUG=580745
Review URL: https://codereview.chromium.org/1647733002
Cr-Commit-Position: refs/heads/master@{#371933}
Initial migration of wiki content over to src/docs
There will be a follow-up CL to ensure docs are following chromium’s style guide, links are fixed, etc. The file auditing was becoming too much for a single change and per Nico’s suggestion, it seems to be better to do
+ Bulk import with initial prune.
+ Follow-up CLs to clean up the documentation.
So that each CL has its own purpose.
BUG=none
Review URL: https://codereview.chromium.org/1309473002
Cr-Commit-Position: refs/heads/master@{#345186}