[clang] Update std symbols mapping (PR #113612)

via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 25 14:37:57 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 95e5a999ab8f2a8f163899c6ab445baf901c3c96...00022af56794b68e3f1adb2e0c3ffb87eae71571 clang/tools/include-mapping/cppreference_parser.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- cppreference_parser.py	2024-10-25 21:19:10.000000 +0000
+++ cppreference_parser.py	2024-10-25 21:37:26.676931 +0000
@@ -91,21 +91,20 @@
 
 def _ParseSymbolVariant(caption):
     if not (isinstance(caption, NavigableString) and "(" in caption):
         return None
 
-    if ')' in caption.text:  # (locale), (algorithm), etc.
+    if ")" in caption.text:  # (locale), (algorithm), etc.
         return caption.text.strip(" ()")
 
     second_part = caption.next_sibling
     if isinstance(second_part, Tag) and second_part.name == "code":
         # (<code>std::complex</code>), etc.
         third_part = second_part.next_sibling
-        if isinstance(third_part, NavigableString) and third_part.text.startswith(')'):
+        if isinstance(third_part, NavigableString) and third_part.text.startswith(")"):
             return second_part.text
     return None
-
 
 
 def _ParseIndexPage(index_page_html):
     """Parse index page.
     The index page lists all std symbols and hrefs to their detailed pages

``````````

</details>


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


More information about the cfe-commits mailing list