This is a clang tool to extract network traffic annotations. The tool is run by
tools/traffic_annotation/auditor/traffic_annotation_auditor. Refer to it for help on how to use.
tools/clang/scripts/update.py --bootstrap --force-local-build --without-android --extra-tools traffic_annotation_extractor
VS2015 x64 Native Tools Command Prompt, or open a normal command prompt and run
depot_tools\win_toolchain\vs_files\ $long_autocompleted_hash\win_sdk\bin\setenv.cmd /x64
python tools/clang/scripts/update.py --bootstrap --force-local-build --without-android --extra-tools traffic_annotation_extractor
traffic_annotation_extractor --help for parameters help.
Example for direct call:
third_party/llvm-build/Release+Asserts/bin/traffic_annotation_extractor -p=out/Debug components/spellcheck/browser/spelling_service_client.cc
Example for call using run_tool.py:
tools/clang/scripts/run_tool.py --tool=traffic_annotation_extractor --generate-compdb -p=out/Debug components/spellcheck/browser
The executable extracts network traffic annotations and calls to network request generation functions from given file paths based on build parameters in build path, and writes them to llvm::outs. It also finds all code sites in which a network traffic annotation tag or any of its variants are directly assigned using a list expression constructor or assignment to its |unique_id_hash_code| argument.
Each annotation output will have the following format:
Each function call output will have the following format:
Each direct assignment output will have the following format: