[clang-tools-extra] [clang-tidy] Add checker alias framework and restore hicpp aliases (PR #197927)

via cfe-commits cfe-commits at lists.llvm.org
Mon May 18 05:51:37 PDT 2026


================
@@ -236,11 +256,86 @@ static bool parseFileExtensions(llvm::ArrayRef<std::string> AllFileExtensions,
   return true;
 }
 
+/// Expand check alias patterns in the checks string.
+/// For each glob pattern, if it matches an alias name, also add the canonical
+/// name (and vice versa) with the same +/- prefix. This ensures that disabling
+/// either name disables both.
+static std::string expandCheckAliases(StringRef Checks) {
+  if (Checks.empty())
+    return std::string(Checks);
----------------
earnol wrote:

We want to return an empty string here. It's a guard to handle a border case when user request no checks at all :)
I'll change to ``return {}`` if you do not mind.

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


More information about the cfe-commits mailing list