Lines Matching +full:html +full:- +full:export
14 …be used in a variety of ways. The importing of external TU definitions can work with pre-dumped PCH
15 files or generating the necessary AST structure on-demand, during the analysis of the main TU. Driv…
18 …ted by other tools, like `CodeChecker <https://github.com/Ericsson/codechecker>`_ and scan-build-py
21 PCH-based analysis
26 `clang-extdef-mapping`. Entries in the index *must* have an `.ast` suffix if the goal
27 is to use PCH-based analysis, as the lack of that extension signals that the entry is to be used as…
37 .. code-block:: cpp
46 .. code-block:: cpp
55 .. code-block:: bash
60 "command": "clang++ -c foo.cpp -o foo.o",
65 "command": "clang++ -c main.cpp -o main.o",
74 .. code-block:: bash
77 $ clang++ -emit-ast -o foo.cpp.ast foo.cpp
84 source files in format `<USR-Length>:<USR> <File-Path>`:
86 .. code-block:: bash
88 $ clang-extdef-mapping -p . foo.cpp
90 $ clang-extdef-mapping -p . foo.cpp > externalDefMap.txt
94 .. code-block:: bash
96 $ sed -i -e "s/.cpp/.cpp.ast/g" externalDefMap.txt
100 .. code-block:: bash
102 $ sed -i -e "s|$(pwd)/||g" externalDefMap.txt
107 .. code-block:: bash
111 $ clang++ --analyze \
112 -Xclang -analyzer-config -Xclang experimental-enable-naive-ctu-analysis=true \
113 -Xclang -analyzer-config -Xclang ctu-dir=. \
114 -Xclang -analyzer-output=plist-multi-file \
121 $ ls -F
125 This manual procedure is error-prone and not scalable, therefore to analyze real projects it is rec…
126 `CodeChecker` or `scan-build-py`.
133 .. code-block:: bash
135 $ CodeChecker analyze --ctu compile_commands.json -o reports
136 $ ls -F
153 .. code-block:: bash
163 ----==== Summary ====----
164 -----------------------
166 -----------------------
168 -----------------------
169 -----------------------
171 -----------------------
173 -----------------------
174 ----=================----
176 ----=================----
178 Or we can use `CodeChecker parse -e html` to export the results into HTML format:
180 .. code-block:: bash
182 $ CodeChecker parse -e html -o html_out reports
183 $ firefox html_out/index.html
185 Automated CTU Analysis with scan-build-py (don't do it)
187 We actively develop CTU with CodeChecker as the driver for this feature, `scan-build-py` is not act…
188 `scan-build-py` has various errors and issues, expect it to work only with the very basic projects …
190 Example usage of scan-build-py:
192 .. code-block:: bash
194 $ /your/path/to/llvm-project/clang/tools/scan-build-py/bin/analyze-build --ctu
195 …analyze-build: Run 'scan-view /tmp/scan-build-2019-07-17-17-53-33-810365-7fqgWk' to examine bug re…
196 …$ /your/path/to/llvm-project/clang/tools/scan-view/bin/scan-view /tmp/scan-build-2019-07-17-17-53-…
197 Starting scan-view at: http://127.0.0.1:8181
198 Use Ctrl-C to exit.
204 .. _ctu-on-demand:
206 On-demand analysis
210 The compiler invocation is a shell command that could be used to compile the TU-s main source file.
213 analyzer-config argument.
215 `clang-extdef-mapping`. Entries in the index must *not* have an `.ast` suffix if the goal
216 is to use On-demand analysis, as that extension signals that the entry is to be used as an PCH-dump.
228 .. code-block:: cpp
237 .. code-block:: cpp
246 .. code-block:: bash
251 "command": "clang++ -c foo.cpp -o foo.o",
256 "command": "clang++ -c main.cpp -o main.o",
263 .. code-block:: bash
266 - "clang++"
267 - "-c"
268 - "/path/to/your/project/foo.cpp"
269 - "-o"
270 - "/path/to/your/project/foo.o"
273 - "clang++"
274 - "-c"
275 - "/path/to/your/project/main.cpp"
276 - "-o"
277 - "/path/to/your/project/main.o"
280 As we are using On-demand mode, we only need to create a CTU index file which holds the `USR` name …
281 external definitions in the source files in format `<USR-Length>:<USR> <File-Path>`:
283 .. code-block:: bash
285 $ clang-extdef-mapping -p . foo.cpp
287 $ clang-extdef-mapping -p . foo.cpp > externalDefMap.txt
292 .. code-block:: bash
296 $ clang++ --analyze \
297 -Xclang -analyzer-config -Xclang experimental-enable-naive-ctu-analysis=true \
298 -Xclang -analyzer-config -Xclang ctu-dir=. \
299 -Xclang -analyzer-config -Xclang ctu-invocation-list=invocations.yaml \
300 -Xclang -analyzer-output=plist-multi-file \
307 $ ls -F
311 This manual procedure is error-prone and not scalable, therefore to analyze real projects it is rec…
312 `CodeChecker` or `scan-build-py`.
319 .. code-block:: bash
321 $ CodeChecker analyze --ctu --ctu-ast-loading-mode on-demand compile_commands.json -o reports
322 $ ls -F
339 .. code-block:: bash
349 ----==== Summary ====----
350 -----------------------
352 -----------------------
354 -----------------------
355 -----------------------
357 -----------------------
359 -----------------------
360 ----=================----
362 ----=================----
364 Or we can use `CodeChecker parse -e html` to export the results into HTML format:
366 .. code-block:: bash
368 $ CodeChecker parse -e html -o html_out reports
369 $ firefox html_out/index.html
371 Automated CTU Analysis with scan-build-py (don't do it)
373 We actively develop CTU with CodeChecker as the driver for feature, `scan-build-py` is not actively…
374 `scan-build-py` has various errors and issues, expect it to work only with the very basic projects …
376 Currently On-demand analysis is not supported with `scan-build-py`.