Files
RedBear-OS/local/recipes/dev/libclc/source/clang/test/OpenMP/openmp-6-future-spellings.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

56 lines
2.3 KiB
C++

// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=52 -ferror-limit 100 -o - %s
// expected-warning@+1 {{directive spelling 'begin declare_target' is introduced in a later OpenMP version}}
#pragma omp begin declare_target
void f0();
// expected-warning@+1 {{directive spelling 'end declare_target' is introduced in a later OpenMP version}}
#pragma omp end declare_target
// expected-warning@+1 {{directive spelling 'begin declare_variant' is introduced in a later OpenMP version}}
#pragma omp begin declare_variant match(user={condition(true)})
void f1();
// expected-warning@+1 {{directive spelling 'end declare_variant' is introduced in a later OpenMP version}}
#pragma omp end declare_variant
int x;
// expected-warning@+1 {{directive spelling 'declare_target' is introduced in a later OpenMP version}}
#pragma omp declare_target(x)
struct A {
int x, y;
};
// expected-warning@+1 {{directive spelling 'declare_mapper' is introduced in a later OpenMP version}}
#pragma omp declare_mapper(mymapper: A a) map(tofrom:a.x, a.y)
A add(A, A);
// expected-warning@+1 {{directive spelling 'declare_reduction' is introduced in a later OpenMP version}}
#pragma omp declare_reduction(+: A: omp_out = add(omp_in, omp_out))
// expected-warning@+1 {{directive spelling 'declare_simd' is introduced in a later OpenMP version}}
#pragma omp declare_simd
void f2();
void g3();
// expected-warning@+1 {{directive spelling 'declare_variant' is introduced in a later OpenMP version}}
#pragma omp declare_variant(g3) match(user={condition(true)})
void f3() {}
void fred() {
#pragma omp parallel
{
// expected-warning@+1 {{directive spelling 'cancellation_point' is introduced in a later OpenMP version}}
#pragma omp cancellation_point parallel
}
// expected-warning@+1 {{directive spelling 'target_data' is introduced in a later OpenMP version}}
#pragma omp target_data map(tofrom: x)
{}
// expected-warning@+1 {{directive spelling 'target_enter_data' is introduced in a later OpenMP version}}
#pragma omp target_enter_data map(to: x)
// expected-warning@+1 {{directive spelling 'target_exit_data' is introduced in a later OpenMP version}}
#pragma omp target_exit_data map(from: x)
// expected-warning@+1 {{directive spelling 'target_update' is introduced in a later OpenMP version}}
#pragma omp target_update from(x)
}