Files
codegraph/__tests__/fixtures/kernel-parity/torture.hpp
T
2d72891b59 feat(kernel): R7a C/C++ walker — dual-lang ccpp module, preParse hoist, 7 new blanks, c/cpp default-routed (#1346)
Parity: 0 diffs on redis/git/fmt/protobuf/ALS sweeps; full-init dumps
byte-identical on all five + linux at kernel scale (10.4M dump lines,
same sha256 both arms). Linux 2c/6GB envelope: kernel-arm 19.1min vs
wasm-arm 22.9min (parse 356s vs 435s) on a much richer graph (the new
blanks recover error-swallowed code: git 2x nodes, linux kernel/+mm/ 3x).
Deferral guard corrected by measurement (C/C++ error incidence 9-42%;
--max-deferral flag); defer-reuse memo kills the 3x re-blank/re-parse
cost deferred files paid.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 16:56:41 -05:00

32 lines
755 B
C++

// Torture header for the C++ kernel walker (R7a) — include guard, forward
// declarations (skipped, #1093), extern "C" prototypes, header templates,
// and a UE-reflection-shaped class recovered by the hoisted preParse.
#ifndef TORTURE_HPP
#define TORTURE_HPP
class Forward;
struct Opaque;
extern "C" {
int c_bridge(int value);
}
/// Reusable clamp helper.
template <typename T>
T clamp_value(T v, T lo, T hi) {
return v < lo ? lo : (v > hi ? hi : v);
}
class MYLIB_API Meter : public Forward {
public:
UPROPERTY(BlueprintReadOnly)
int Reading;
FORCEINLINE int Peek() const { return Reading; }
void Calibrate(int target);
Forward *owner();
};
inline void Meter::Calibrate(int target) { Reading = clamp_value(target, 0, 100); }
#endif