Files
RedBear-OS/local/recipes/dev/libclc/source/clang/test/CodeGenCXX/attr-x86-interrupt.cpp
T
vasilito cb424d7448 build: static patch-sanity linter (shift-left the malformed-patch class)
verify-patch-sanity.py validates every active recipe .patch has internally-
consistent hunk line counts — catching the 'malformed patch at line N' failure
at commit/CI/preflight time instead of hours into a cook. This cycle hit that
class three times (qtwaylandscanner, sddm, xwayland), each only discovered when
cookbook tried to apply the patch.

Running it across the repo found 29 latent malformed patches (validated against
GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22').
They were harmless only because they sit in vendored recipes (baked, not re-
applied) — but would fail on any version-bump re-derivation. --fix recounts the
hunk headers (body untouched) and repaired all 29.

Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test
(test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats
(empty placeholders, bare-@@ git hunks).
2026-08-01 05:13:02 +03:00

36 lines
2.6 KiB
C++

// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_LINUX
// RUN: %clang_cc1 -triple i386-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_LINUX
// RUN: %clang_cc1 -triple x86_64-pc-win32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_WIN
// RUN: %clang_cc1 -triple i386-pc-win32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_WIN
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnux32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_LINUX
#ifdef __x86_64__
typedef __UINT64_TYPE__ uword;
#else
typedef __UINT32_TYPE__ uword;
#endif
__attribute__((interrupt)) void foo7(int *a, uword b) {}
namespace S {
__attribute__((interrupt)) void foo8(int *a) {}
}
struct St {
static void foo9(int *a) __attribute__((interrupt)) {}
};
// X86_64_LINUX: @llvm.compiler.used = appending global [3 x ptr] [ptr @{{.*}}foo7{{.*}}, ptr @{{.*}}foo8{{.*}}, ptr @{{.*}}foo9{{.*}}], section "llvm.metadata"
// X86_64_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo7{{.*}}(ptr noundef byval(i32) %{{.+}}, i64 noundef %{{.+}})
// X86_64_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo8{{.*}}(ptr noundef byval(i32) %{{.+}})
// X86_64_LINUX: define linkonce_odr x86_intrcc void @{{.*}}foo9{{.*}}(ptr noundef byval(i32) %{{.+}})
// X86_LINUX: @llvm.compiler.used = appending global [3 x ptr] [ptr @{{.*}}foo7{{.*}}, ptr @{{.*}}foo8{{.*}}, ptr @{{.*}}foo9{{.*}}], section "llvm.metadata"
// X86_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo7{{.*}}(ptr noundef byval(i32) %{{.+}}, i32 noundef %{{.+}})
// X86_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo8{{.*}}(ptr noundef byval(i32) %{{.+}})
// X86_LINUX: define linkonce_odr x86_intrcc void @{{.*}}foo9{{.*}}(ptr noundef byval(i32) %{{.+}})
// X86_64_WIN: @llvm.used = appending global [3 x ptr] [ptr @{{.*}}foo7{{.*}}, ptr @{{.*}}foo8{{.*}}, ptr @{{.*}}foo9{{.*}}], section "llvm.metadata"
// X86_64_WIN: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(ptr noundef byval(i32) %{{.+}}, i64 noundef %{{.+}})
// X86_64_WIN: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(ptr noundef byval(i32) %{{.+}})
// X86_64_WIN: define linkonce_odr dso_local x86_intrcc void @{{.*}}foo9{{.*}}(ptr noundef byval(i32) %{{.+}})
// X86_WIN: @llvm.used = appending global [3 x ptr] [ptr @{{.*}}foo7{{.*}}, ptr @{{.*}}foo8{{.*}}, ptr @{{.*}}foo9{{.*}}], section "llvm.metadata"
// X86_WIN: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(ptr noundef byval(i32) %{{.+}}, i32 noundef %{{.+}})
// X86_WIN: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(ptr noundef byval(i32) %{{.+}})
// X86_WIN: define linkonce_odr dso_local x86_intrcc void @{{.*}}foo9{{.*}}(ptr noundef byval(i32) %{{.+}})