[libcxx-commits] [libcxx] [libc++] Use ValueError instead of non-existent ArgumentError (PR #179526)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 3 10:48:00 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

<details>
<summary>Changes</summary>

ArgumentError does not exist. argparse.ArgumentError does exist, but that is not what we want to use. I presume this was never caught because we never execute that line.

---
Full diff: https://github.com/llvm/llvm-project/pull/179526.diff


2 Files Affected:

- (modified) libcxx/test/libcxx-03/transitive_includes/to_csv.py (+1-1) 
- (modified) libcxx/test/libcxx/transitive_includes/to_csv.py (+1-1) 


``````````diff
diff --git a/libcxx/test/libcxx-03/transitive_includes/to_csv.py b/libcxx/test/libcxx-03/transitive_includes/to_csv.py
index 69d94deedf6f5..3035ff6cfe5c8 100755
--- a/libcxx/test/libcxx-03/transitive_includes/to_csv.py
+++ b/libcxx/test/libcxx-03/transitive_includes/to_csv.py
@@ -28,7 +28,7 @@ def parse_line(line: str) -> Tuple[int, str]:
     """
     match = re.match(r"(\.+) (.+)", line)
     if not match:
-        raise ArgumentError(f"Line {line} contains invalid data.")
+        raise ValueError(f"Line {line} contains invalid data.")
 
     # The number of periods in front of the header name is the nesting level of
     # that header.
diff --git a/libcxx/test/libcxx/transitive_includes/to_csv.py b/libcxx/test/libcxx/transitive_includes/to_csv.py
index 69d94deedf6f5..3035ff6cfe5c8 100755
--- a/libcxx/test/libcxx/transitive_includes/to_csv.py
+++ b/libcxx/test/libcxx/transitive_includes/to_csv.py
@@ -28,7 +28,7 @@ def parse_line(line: str) -> Tuple[int, str]:
     """
     match = re.match(r"(\.+) (.+)", line)
     if not match:
-        raise ArgumentError(f"Line {line} contains invalid data.")
+        raise ValueError(f"Line {line} contains invalid data.")
 
     # The number of periods in front of the header name is the nesting level of
     # that header.

``````````

</details>


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


More information about the libcxx-commits mailing list