[clang] [NFC][analyzer] Document configuration options (PR #135169)

Donát Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue May 13 08:08:21 PDT 2025


================
@@ -227,8 +263,11 @@ def get_option_list(input_file):
 
 p = argparse.ArgumentParser()
 p.add_argument("--options-def", help="path to AnalyzerOptions.def")
-p.add_argument("--template", help="path of template file")
-p.add_argument("--out", help="path of output file")
+p.add_argument("--template", help="template file")
+p.add_argument("--out", help="output file")
+p.add_argument(
+    "--validate", action="store_true", help="exit with failure on parsing error"
+)
----------------
NagyDonat wrote:

I didn't enable validation when the script is run from `cmake` to compile the documentation because the script is robust enough to produce useful output even if it cannot recognize a few characters within `AnalyzerOptions.def`. However – now that I think about it – this is actually an unlikely situation, because changes to `AnalyzerOptions.def` would be caught by the tests.

To simplify the script I'll remove this `--validate` flag and always exit with failure when there is a parsing error. 

https://github.com/llvm/llvm-project/pull/135169


More information about the cfe-commits mailing list