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).
26 lines
1.0 KiB
C++
26 lines
1.0 KiB
C++
// Fake standard library with uglified names.
|
|
// Parameters (including template params) get ugliness stripped.
|
|
namespace std {
|
|
|
|
template <typename _Tp>
|
|
class __vector_base {};
|
|
|
|
template <typename _Tp>
|
|
class vector : private __vector_base<_Tp> {
|
|
public:
|
|
_Tp &at(unsigned __index) const;
|
|
int __stays_ugly();
|
|
};
|
|
|
|
} // namespace std
|
|
|
|
int x = std::vector<int>{}.at(42);
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):14 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
|
|
// CHECK-CC1: COMPLETION: __vector_base : __vector_base<<#typename Tp#>>
|
|
// CHECK-CC1: COMPLETION: vector : vector<<#typename Tp#>>
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-4):28 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
|
|
// CHECK-CC2: COMPLETION: __stays_ugly : [#int#]__stays_ugly()
|
|
// CHECK-CC2: COMPLETION: at : [#int &#]at(<#unsigned int index#>)[# const#]
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-7):31 %s -o - | FileCheck -check-prefix=CHECK-CC3 %s
|
|
// CHECK-CC3: OVERLOAD: [#int &#]at(<#unsigned int index#>)
|