mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-19 19:14:48 +00:00
Bump to Clang 19 (#2434)
This commit is contained in:
parent
e67263cc0e
commit
8447412c77
8 changed files with 16 additions and 14 deletions
|
@ -10,7 +10,7 @@ if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dis
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Default clang-format points to default 3.5 version one
|
# Default clang-format points to default 3.5 version one
|
||||||
CLANG_FORMAT=clang-format-18
|
CLANG_FORMAT=clang-format-19
|
||||||
$CLANG_FORMAT --version
|
$CLANG_FORMAT --version
|
||||||
|
|
||||||
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
|
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
|
||||||
|
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -30,9 +30,9 @@ jobs:
|
||||||
- name: Install
|
- name: Install
|
||||||
run: |
|
run: |
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||||
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
|
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main'
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install clang-format-18
|
sudo apt install clang-format-19
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||||
|
|
|
@ -339,7 +339,9 @@ void CondvarWait(Condvar& cv, std::unique_lock<Lock>& lk, std::stop_token token,
|
||||||
}
|
}
|
||||||
|
|
||||||
std::stop_callback callback(token, [&] {
|
std::stop_callback callback(token, [&] {
|
||||||
{ std::scoped_lock lk2{*lk.mutex()}; }
|
{
|
||||||
|
std::scoped_lock lk2{*lk.mutex()};
|
||||||
|
}
|
||||||
cv.notify_all();
|
cv.notify_all();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ void SetCurrentThreadRealtime(const std::chrono::nanoseconds period_ns) {
|
||||||
const std::chrono::nanoseconds computation_ns = period_ns / 2;
|
const std::chrono::nanoseconds computation_ns = period_ns / 2;
|
||||||
|
|
||||||
// Determine the timebase for converting time to ticks.
|
// Determine the timebase for converting time to ticks.
|
||||||
struct mach_timebase_info timebase {};
|
struct mach_timebase_info timebase{};
|
||||||
mach_timebase_info(&timebase);
|
mach_timebase_info(&timebase);
|
||||||
const auto ticks_per_ns =
|
const auto ticks_per_ns =
|
||||||
static_cast<double>(timebase.denom) / static_cast<double>(timebase.numer);
|
static_cast<double>(timebase.denom) / static_cast<double>(timebase.numer);
|
||||||
|
|
|
@ -111,7 +111,7 @@ SignalDispatch::SignalDispatch() {
|
||||||
ASSERT_MSG(handle = AddVectoredExceptionHandler(0, SignalHandler),
|
ASSERT_MSG(handle = AddVectoredExceptionHandler(0, SignalHandler),
|
||||||
"Failed to register exception handler.");
|
"Failed to register exception handler.");
|
||||||
#else
|
#else
|
||||||
struct sigaction action {};
|
struct sigaction action{};
|
||||||
action.sa_sigaction = SignalHandler;
|
action.sa_sigaction = SignalHandler;
|
||||||
action.sa_flags = SA_SIGINFO | SA_ONSTACK;
|
action.sa_flags = SA_SIGINFO | SA_ONSTACK;
|
||||||
sigemptyset(&action.sa_mask);
|
sigemptyset(&action.sa_mask);
|
||||||
|
@ -130,7 +130,7 @@ SignalDispatch::~SignalDispatch() {
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
ASSERT_MSG(RemoveVectoredExceptionHandler(handle), "Failed to remove exception handler.");
|
ASSERT_MSG(RemoveVectoredExceptionHandler(handle), "Failed to remove exception handler.");
|
||||||
#else
|
#else
|
||||||
struct sigaction action {};
|
struct sigaction action{};
|
||||||
action.sa_handler = SIG_DFL;
|
action.sa_handler = SIG_DFL;
|
||||||
action.sa_flags = 0;
|
action.sa_flags = 0;
|
||||||
sigemptyset(&action.sa_mask);
|
sigemptyset(&action.sa_mask);
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
#include "string"
|
#include "string"
|
||||||
|
|
||||||
class EditorDialog : public QDialog {
|
class EditorDialog : public QDialog {
|
||||||
Q_OBJECT // Necessary for using Qt's meta-object system (signals/slots)
|
Q_OBJECT // Necessary for using Qt's meta-object system (signals/slots)
|
||||||
public : explicit EditorDialog(QWidget* parent = nullptr); // Constructor
|
public : explicit EditorDialog(QWidget* parent = nullptr); // Constructor
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent* event) override; // Override close event
|
void closeEvent(QCloseEvent* event) override; // Override close event
|
||||||
|
|
|
@ -14,8 +14,8 @@ namespace Shader::IR {
|
||||||
// Use typename Instruction so the function can be used to return either const or mutable
|
// Use typename Instruction so the function can be used to return either const or mutable
|
||||||
// Insts depending on the context.
|
// Insts depending on the context.
|
||||||
template <typename Instruction, typename Pred>
|
template <typename Instruction, typename Pred>
|
||||||
auto BreadthFirstSearch(Instruction* inst,
|
auto BreadthFirstSearch(Instruction* inst, Pred&& pred)
|
||||||
Pred&& pred) -> std::invoke_result_t<Pred, Instruction*> {
|
-> std::invoke_result_t<Pred, Instruction*> {
|
||||||
// Most often case the instruction is the desired already.
|
// Most often case the instruction is the desired already.
|
||||||
if (std::optional result = pred(inst)) {
|
if (std::optional result = pred(inst)) {
|
||||||
return result;
|
return result;
|
||||||
|
@ -53,8 +53,8 @@ auto BreadthFirstSearch(Instruction* inst,
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Pred>
|
template <typename Pred>
|
||||||
auto BreadthFirstSearch(const Value& value,
|
auto BreadthFirstSearch(const Value& value, Pred&& pred)
|
||||||
Pred&& pred) -> std::invoke_result_t<Pred, const Inst*> {
|
-> std::invoke_result_t<Pred, const Inst*> {
|
||||||
if (value.IsImmediate()) {
|
if (value.IsImmediate()) {
|
||||||
// Nothing to do with immediates
|
// Nothing to do with immediates
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
|
@ -53,7 +53,7 @@ constexpr Type F64x3{Type::F64x3};
|
||||||
constexpr Type F64x4{Type::F64x4};
|
constexpr Type F64x4{Type::F64x4};
|
||||||
constexpr Type StringLiteral{Type::StringLiteral};
|
constexpr Type StringLiteral{Type::StringLiteral};
|
||||||
|
|
||||||
constexpr OpcodeMeta META_TABLE[] {
|
constexpr OpcodeMeta META_TABLE[]{
|
||||||
#define OPCODE(name_token, type_token, ...) \
|
#define OPCODE(name_token, type_token, ...) \
|
||||||
{ \
|
{ \
|
||||||
.name{#name_token}, \
|
.name{#name_token}, \
|
||||||
|
|
Loading…
Add table
Reference in a new issue