Files
RedBear-OS/local/recipes/dev/libclc/source/clang/test/CodeGenCXX/observe-noexcept.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

48 lines
1.4 KiB
C++

// RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -std=c++11 -fopenmp -fexceptions -fcxx-exceptions -O0 -emit-llvm %s -o - | FileCheck %s
// Check that regions that install a terminate scope in the exception stack can
// correctly generate complex arithmetic.
// CHECK-LABEL: ffcomplex
void ffcomplex (int a) {
double _Complex dc = (double)a;
// CHECK: call noundef { double, double } @__muldc3(double noundef %{{.+}}, double noundef %{{.+}}, double noundef %{{.+}}, double noundef %{{.+}})
dc *= dc;
// CHECK: call {{.+}} @__kmpc_fork_call({{.+}} [[REGNAME1:@.*]], ptr %{{.+}})
#pragma omp parallel
{
dc *= dc;
}
// CHECK: ret void
}
// CHECK: define internal {{.+}}[[REGNAME1]](
// CHECK-NOT: invoke
// CHECK: call noundef { double, double } @__muldc3(double noundef %{{.+}}, double noundef %{{.+}}, double noundef %{{.+}}, double noundef %{{.+}})
// CHECK-NOT: invoke
// CHECK: ret void
// Check if we are observing the function pointer attribute regardless what is
// in the exception specification of the callees.
void fnoexcp(void) noexcept;
// CHECK-LABEL: foo
void foo(int a, int b) {
void (*fptr)(void) noexcept = fnoexcp;
// CHECK: call {{.+}} @__kmpc_fork_call({{.+}} [[REGNAME2:@.*]], ptr %{{.+}})
#pragma omp parallel
{
fptr();
}
// CHECK: ret void
}
// CHECK: define internal {{.+}}[[REGNAME2]](
// CHECK-NOT: invoke
// CHECK: call void %{{[0-9]+}}()
// CHECK-NOT: invoke
// CHECK: ret void