diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py index c642000eba228..520212883d997 100755 --- a/clang-tools-extra/clang-tidy/add_new_check.py +++ b/clang-tools-extra/clang-tidy/add_new_check.py @@ -483,7 +483,7 @@ def process_doc(doc_file): def format_link(doc_file): check_name, match = process_doc(doc_file) - if not match and check_name: + if not match and check_name and not check_name.startswith("clang-analyzer-"): return " `%(check_name)s <%(module)s/%(check)s.html>`_,%(autofix)s\n" % { "check_name": check_name, "module": doc_file[0], @@ -495,13 +495,13 @@ def format_link(doc_file): def format_link_alias(doc_file): check_name, match = process_doc(doc_file) - if match and check_name: + if (match or (check_name.startswith("clang-analyzer-"))) and check_name: module = doc_file[0] check_file = doc_file[1].replace(".rst", "") - if match.group(1) == "https://clang.llvm.org/docs/analyzer/checkers": + if not match or match.group(1) == "https://clang.llvm.org/docs/analyzer/checkers": title = "Clang Static Analyzer " + check_file # Preserve the anchor in checkers.html from group 2. - target = match.group(1) + ".html" + match.group(2) + target = "" if not match else match.group(1) + ".html" + match.group(2) autofix = "" else: redirect_parts = re.search("^\.\./([^/]*)/([^/]*)$", match.group(1)) @@ -509,18 +509,30 @@ def format_link_alias(doc_file): target = redirect_parts[1] + "/" + redirect_parts[2] + ".html" autofix = has_auto_fix(title) - # The checker is just a redirect. - return ( - " `%(check_name)s <%(module)s/%(check_file)s.html>`_, `%(title)s <%(target)s>`_,%(autofix)s\n" - % { - "check_name": check_name, - "module": module, - "check_file": check_file, - "target": target, - "title": title, - "autofix": autofix, - } - ) + if target: + # The checker is just a redirect. + return ( + " `%(check_name)s <%(module)s/%(check_file)s.html>`_, `%(title)s <%(target)s>`_,%(autofix)s\n" + % { + "check_name": check_name, + "module": module, + "check_file": check_file, + "target": target, + "title": title, + "autofix": autofix, + }) + else: + # The checker is just a alias without redirect. + return ( + " `%(check_name)s <%(module)s/%(check_file)s.html>`_, %(title)s,%(autofix)s\n" + % { + "check_name": check_name, + "module": module, + "check_file": check_file, + "target": target, + "title": title, + "autofix": autofix, + }) return "" checks = map(format_link, doc_files) diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst index f4c835247ab9e..6dfdf34e9d026 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/list.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -165,26 +165,6 @@ Clang-Tidy Checks `cert-msc51-cpp `_, `cert-oop57-cpp `_, `cert-oop58-cpp `_, - `clang-analyzer-core.DynamicTypePropagation `_, - `clang-analyzer-core.uninitialized.CapturedBlockVariable `_, - `clang-analyzer-cplusplus.InnerPointer `_, - `clang-analyzer-nullability.NullableReturnedFromNonnull `_, - `clang-analyzer-optin.osx.OSObjectCStyleCast `_, - `clang-analyzer-optin.performance.GCDAntipattern `_, - `clang-analyzer-optin.performance.Padding `_, - `clang-analyzer-optin.portability.UnixAPI `_, - `clang-analyzer-osx.MIG `_, - `clang-analyzer-osx.NumberObjectConversion `_, - `clang-analyzer-osx.OSObjectRetainCount `_, - `clang-analyzer-osx.ObjCProperty `_, - `clang-analyzer-osx.cocoa.AutoreleaseWrite `_, - `clang-analyzer-osx.cocoa.Loops `_, - `clang-analyzer-osx.cocoa.MissingSuperCall `_, - `clang-analyzer-osx.cocoa.NonNilReturnValue `_, - `clang-analyzer-osx.cocoa.RunLoopAutoreleaseLeak `_, - `clang-analyzer-valist.CopyToSelf `_, - `clang-analyzer-valist.Uninitialized `_, - `clang-analyzer-valist.Unterminated `_, `concurrency-mt-unsafe `_, `concurrency-thread-canceltype-asynchronous `_, `cppcoreguidelines-avoid-capturing-lambda-coroutines `_, @@ -255,7 +235,7 @@ Clang-Tidy Checks `llvm-twine-local `_, "Yes" `llvmlibc-callee-namespace `_, `llvmlibc-implementation-in-namespace `_, - `llvmlibc-inline-function-decl `_, + `llvmlibc-inline-function-decl `_, "Yes" `llvmlibc-restrict-system-libc-headers `_, "Yes" `misc-confusable-identifiers `_, `misc-const-correctness `_, "Yes"