cb424d7448
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).
59 lines
1.9 KiB
Plaintext
59 lines
1.9 KiB
Plaintext
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-unused-value -Wno-c++1y-extensions -std=c++11 %s
|
|
|
|
class C {
|
|
id get(int);
|
|
|
|
void f() {
|
|
int foo, bar, baz;
|
|
|
|
// fail to parse as a lambda introducer, so we get objc message parsing errors instead
|
|
[foo,+] {}; // expected-error {{expected expression}}
|
|
|
|
[]; // expected-error {{expected body of lambda expression}}
|
|
[=,foo+] {}; // expected-error {{expected ',' or ']' in lambda capture list}}
|
|
[&this] {}; // expected-error {{cannot take the address of an rvalue of type 'C *'}} \
|
|
// expected-error {{expected identifier}}
|
|
[] {};
|
|
[=] (int i) {};
|
|
[&] (int) mutable -> void {};
|
|
[foo,bar] () { return 3; };
|
|
[=,&foo] () {};
|
|
[this] () {};
|
|
|
|
[foo(bar)] () {};
|
|
[foo = bar] () {};
|
|
[foo{bar}] () {};
|
|
[foo = {bar}] () {}; // expected-error {{<initializer_list>}}
|
|
|
|
[foo(bar) baz] () {}; // expected-error {{called object type 'int' is not a function}} \
|
|
// expected-error {{expected ';'}}
|
|
[foo(bar), baz] () {}; // ok
|
|
|
|
[foo = bar baz]; // expected-warning {{receiver type 'int'}} expected-warning {{instance method '-baz'}}
|
|
|
|
[get(bar) baz]; // expected-warning {{instance method '-baz'}}
|
|
[get(bar), baz]; // expected-error {{expected body of lambda}}
|
|
|
|
[foo = bar ++ baz]; // expected-warning {{receiver type 'int'}} expected-warning {{instance method '-baz'}}
|
|
[foo = bar + baz]; // expected-error {{expected body of lambda}}
|
|
[foo = { bar, baz }]; // expected-error {{<initializer_list>}} expected-error {{expected body of lambda}}
|
|
[foo = { bar } baz ]; // expected-warning {{receiver type 'int'}} expected-warning {{instance method '-baz'}}
|
|
[foo = { bar }, baz ]; // expected-error {{<initializer_list>}} expected-error {{expected body of lambda}}
|
|
}
|
|
|
|
};
|
|
|
|
struct Func {
|
|
template <typename F>
|
|
Func(F&&);
|
|
};
|
|
|
|
int getInt();
|
|
|
|
void test() {
|
|
[val = getInt()]() { };
|
|
Func{
|
|
[val = getInt()]() { }
|
|
};
|
|
}
|