[clang-tools-extra] [clang-tidy] Reject malformed -std spellings in `check_clang_tidy.py`. NFC. (PR #195609)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon May 4 01:51:50 PDT 2026


================
@@ -460,11 +460,14 @@ def run(self) -> None:
 
 
 def expand_std(std: str) -> List[str]:
-    split_std, or_later, _ = std.partition("-or-later")
+    split_std, or_later, suffix = std.partition("-or-later")
 
     if not or_later:
         return [split_std]
 
+    if suffix:
----------------
zeyi2 wrote:

During the cleanup I found it confusing to have:

```py
if or_later and suffix:
  ...

if not or_later:
  ...
```

So I grouped the -or-later handling into a single branch instead.

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


More information about the cfe-commits mailing list