mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-14 02:02:46 +00:00
## Motivation New changes from upstream llvm-project cause an avalanche of warnings in CK. Gonna disable them by ignoring the lifetime-safety-intra-tu-suggestions flag until a better permanent solution is found. ## Technical Details <!-- Explain the changes along with any relevant GitHub links. --> ## Test Plan <!-- Explain any relevant testing done to verify this PR. --> ## Test Result <!-- Briefly summarize test outcomes. --> ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
26 lines
691 B
C++
26 lines
691 B
C++
// Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
|
|
// SDX-License-Identifier: MIT
|
|
|
|
#ifndef CK_C_STYLE_POINTER_CAST_HPP
|
|
#define CK_C_STYLE_POINTER_CAST_HPP
|
|
|
|
#include "type.hpp"
|
|
#include "enable_if.hpp"
|
|
|
|
namespace ck {
|
|
|
|
template <typename PY,
|
|
typename PX,
|
|
typename enable_if<is_pointer_v<PY> && is_pointer_v<PX>, bool>::type = false>
|
|
__host__ __device__ PY c_style_pointer_cast([[clang::lifetimebound]] PX p_x)
|
|
{
|
|
#pragma clang diagnostic push
|
|
#pragma clang diagnostic ignored "-Wold-style-cast"
|
|
#pragma clang diagnostic ignored "-Wcast-align"
|
|
return (PY)p_x; // NOLINT(old-style-cast, cast-align)
|
|
#pragma clang diagnostic pop
|
|
}
|
|
|
|
} // namespace ck
|
|
#endif
|