[clang] [NFC][analyzer] Document configuration options (PR #135169)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 15 00:36:41 PDT 2025
================
@@ -143,6 +143,32 @@ if (LLVM_ENABLE_SPHINX)
gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs ../include/clang/Basic/Diagnostic.td "${docs_targets}")
gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs ../include/clang/Driver/ClangOptionDocs.td "${docs_targets}")
+ # Another generated file from a different source
+ set(docs_tools_dir ${CMAKE_CURRENT_SOURCE_DIR}/tools)
+ set(aopts_rst_rel_path analyzer/user-docs/Options.rst)
+ set(aopts_rst "${CMAKE_CURRENT_BINARY_DIR}/${aopts_rst_rel_path}")
+ set(analyzeroptions_def "${CMAKE_CURRENT_SOURCE_DIR}/../include/clang/StaticAnalyzer/Core/AnalyzerOptions.def")
+ set(aopts_rst_in "${CMAKE_CURRENT_SOURCE_DIR}/${aopts_rst_rel_path}.in")
+ set(generate_aopts_docs generate_analyzer_options_docs.py)
+ add_custom_command(
+ OUTPUT ${aopts_rst}
+ COMMAND ${Python3_EXECUTABLE} ${generate_aopts_docs} -i ${analyzeroptions_def} -t ${aopts_rst_in} -o ${aopts_rst}
----------------
NagyDonat wrote:
This is unrelated to the interpreter flag: the Python interpreter is parametrized as
```
python3 <arguments for the interpreter> script.py <arguments for the script>
```
and I decided to implement an `-i` flag for specifying the input file of the script. I could change this (probably to `--input`) if you think that it's misleading.
https://github.com/llvm/llvm-project/pull/135169
More information about the cfe-commits
mailing list