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

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Mon May 4 01:28:52 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:
----------------
vbvictor wrote:

Can we add comment here that this is for error path so that clang will give warning

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


More information about the cfe-commits mailing list