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).
70 lines
1.2 KiB
C++
70 lines
1.2 KiB
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
// PR4381
|
|
template<class T> struct X {};
|
|
template<typename T> struct Y : public X<T>::X { };
|
|
|
|
// PR4621
|
|
class A1 {
|
|
A1(int x) {}
|
|
};
|
|
template<class C> class B1 : public A1 {
|
|
B1(C x) : A1(x.x) {}
|
|
};
|
|
class A2 { A2(int x, int y); };
|
|
template <class C> class B2 {
|
|
A2 x;
|
|
B2(C x) : x(x.x, x.y) {}
|
|
};
|
|
template <class C> class B3 {
|
|
C x;
|
|
B3() : x(1,2) {}
|
|
};
|
|
|
|
// PR4627
|
|
template<typename _Container> class insert_iterator {
|
|
_Container* container;
|
|
insert_iterator(_Container& __x) : container(&__x) {}
|
|
};
|
|
|
|
// PR4763
|
|
template<typename T> struct s0 {};
|
|
template<typename T> struct s0_traits {};
|
|
template<typename T> struct s1 : s0<typename s0_traits<T>::t0> {
|
|
s1() {}
|
|
};
|
|
|
|
// PR6062
|
|
namespace PR6062 {
|
|
template <typename T>
|
|
class A : public T::type
|
|
{
|
|
A() : T::type()
|
|
{
|
|
}
|
|
|
|
template <typename U>
|
|
A(U const& init)
|
|
: T::type(init)
|
|
{ }
|
|
|
|
template<typename U>
|
|
A(U& init) : U::other_type(init) { }
|
|
};
|
|
}
|
|
|
|
template<typename T, typename U>
|
|
struct X0 : T::template apply<U> {
|
|
X0(int i) : T::template apply<U>(i) { }
|
|
};
|
|
|
|
// PR7698
|
|
namespace PR7698 {
|
|
template<typename Type>
|
|
class A {
|
|
char mA[sizeof(Type *)];
|
|
A(): mA() {}
|
|
};
|
|
}
|