[llvm-branch-commits] [libcxxabi] [libc++abi] Remove found_our_static_ptr and found_any_static_type from __dynamic_cast_info (PR #244145)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Nov 19 02:34:23 PST 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

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

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- libcxxabi/src/private_typeinfo.cpp libcxxabi/src/private_typeinfo.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxxabi/src/private_typeinfo.cpp b/libcxxabi/src/private_typeinfo.cpp
index 2eb3a930b..38bf63cd8 100644
--- a/libcxxabi/src/private_typeinfo.cpp
+++ b/libcxxabi/src/private_typeinfo.cpp
@@ -218,15 +218,15 @@ const void* dyn_cast_to_derived(
   }
 #endif // _LIBCXXABI_FORGIVING_DYNAMIC_CAST
   switch (res) {
-    case result::unknown:
-    case result::our_static_ptr:
-    case result::any_static_type:
-      return info.path_dst_ptr_to_static_ptr == path_kind::public_path ? dynamic_ptr : nullptr;
-    case result::success:
-      return dynamic_ptr;
-    case result::failure:
-      return nullptr;
-    }
+  case result::unknown:
+  case result::our_static_ptr:
+  case result::any_static_type:
+    return info.path_dst_ptr_to_static_ptr == path_kind::public_path ? dynamic_ptr : nullptr;
+  case result::success:
+    return dynamic_ptr;
+  case result::failure:
+    return nullptr;
+  }
   __builtin_unreachable();
 }
 

``````````

</details>


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


More information about the llvm-branch-commits mailing list