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).
84 lines
2.0 KiB
C++
84 lines
2.0 KiB
C++
// RUN: rm -rf %t
|
|
// RUN: mkdir %t
|
|
// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 std=c++11 %s > %t/out
|
|
// RUN: FileCheck %s < %t/out
|
|
|
|
// Ensure that XML we generate is not invalid.
|
|
// RUN: FileCheck %s -check-prefix=WRONG < %t/out
|
|
// WRONG-NOT: CommentXMLInvalid
|
|
|
|
/**
|
|
* \brief Aaa
|
|
*/
|
|
template<typename T> struct A {
|
|
/**
|
|
* \brief Bbb
|
|
*/
|
|
A();
|
|
/**
|
|
* \brief Ccc
|
|
*/
|
|
~A();
|
|
/**
|
|
* \brief Ddd
|
|
*/
|
|
void f() { }
|
|
};
|
|
// CHECK: <Declaration>template <typename T> struct A {}</Declaration>
|
|
// CHECK: <Declaration>A<T>()</Declaration>
|
|
// CHECK: <Declaration>~A<T>()</Declaration>
|
|
|
|
/**
|
|
* \Brief Eee
|
|
*/
|
|
template <typename T> struct D : A<T> {
|
|
/**
|
|
* \brief
|
|
*/
|
|
using A<T>::f;
|
|
|
|
void f();
|
|
};
|
|
// CHECK: <Declaration>template <typename T> struct D : A<T> {}</Declaration>
|
|
// CHECK: <Declaration>using A<T>::f</Declaration>
|
|
|
|
struct Base {
|
|
int foo;
|
|
};
|
|
/**
|
|
* \brief
|
|
*/
|
|
template<typename T> struct E : Base {
|
|
/**
|
|
* \brief
|
|
*/
|
|
using Base::foo;
|
|
};
|
|
// CHECK: <Declaration>template <typename T> struct E : Base {}</Declaration>
|
|
// CHECK: <Declaration>using Base::foo</Declaration>
|
|
|
|
/// \tparam
|
|
/// \param AAA Blah blah
|
|
template<typename T>
|
|
void func_template_1(T AAA);
|
|
// CHECK: <Declaration>template <typename T> void func_template_1(T AAA)</Declaration>
|
|
|
|
template<template<template<typename CCC> class DDD, class BBB> class AAA>
|
|
void func_template_2();
|
|
// FIXME: There is not Declaration field in the generated output.
|
|
|
|
namespace rdar16128173 {
|
|
// CHECK: <Declaration>template <class PtrTy> class OpaquePtr {}</Declaration>
|
|
|
|
/// \brief Wrapper for void* pointer.
|
|
/// \tparam PtrTy Either a pointer type like 'T*' or a type that behaves like
|
|
/// a pointer.
|
|
template <class PtrTy>
|
|
class OpaquePtr {};
|
|
|
|
// CHECK: <Declaration>typedef OpaquePtr<int> DeclGroupPtrTy</Declaration>
|
|
typedef OpaquePtr<int> DeclGroupPtrTy;
|
|
|
|
DeclGroupPtrTy blah;
|
|
}
|