# Conformance corpus: names a reference demangler reads wrongly.
#
# Every other corpus here records what a reference demangler printed. These cannot, so
# the expected column is derived from the *declaration* instead. Twenty-five of the 37
# entries have a source in tools/corpus_sources/reference_defects/: it is compiled with
# the compiler named on the entry, the symbol is read out of the object file with `nm`,
# and the spelling is what that source says the symbol's type is. Two more come from the
# general corpus sources named on them, and ten are symbols out of shipped libraries and
# Homebrew bottles, where the declaration is the library's own header or its published
# signature and the reading is spelled out in the entry's comment. That is the only
# ground truth a demangler has, and it is what settles a split between references.
#
# Almost all of these are one defect. A <template-param> is a substitution candidate in
# its own right (ABI 5.1.10), and the entry it contributes is *the parameter*, not the
# argument bound to it at the point the entry was made -- nor, for a component built
# over one, the composite that argument produced. The two differ whenever the
# back-reference is read under a different template scope, which is what happens in any
# name mentioning a local entity: the enclosing function's signature is written against
# that function's parameters, a `T_` inside it enters the table, and a later `S<n>_`
# naming that entry belongs to the *outer* template. The mangler does this because it
# canonicalises a template type parameter by level and index, so `T_` of one template
# and `T_` of another are one node to it.
#
# What each reference does, measured over the 217,730 distinct Itanium symbols in the
# shared libraries shipped on Ubuntu 24.04 (libLLVM 17/18/20, libclang-cpp, liblldb,
# libstdc++, libgphobos and the rest):
#
#   llvm-cxxfilt 18.1.3  differs from the corrected answer on 322.
#   GNU c++filt 2.42     refuses 227 of the 322. Of the 95 it reads, it agrees with the
#                        corrected answer on 91. Of the 4 left, 3 are the
#                        `_Prepare_execution` constructor shape, where libstdc++'s own
#                        header settles it against both references; 1 is a generic
#                        lambda's own parameter, which GNU numbers `auto:1` and the
#                        llvm style spells `auto` -- see CONFORMANCE.md note 17.
#
# style: llvm
#
# pairs: 37
#
# tools/corpus_sources/reference_defects/insort.cpp, g++ 13.3.0.
# `insort(I, I, C)`, so the first two parameters are `I` -- the first template argument,
# `nn::Update<nn::BB*>*`. `S8_` is the `T_` entry `legalize`'s signature contributed.
# llvm-cxxfilt 18 prints `nn::BB*`; GNU c++filt 2.42 agrees with the declaration.
_ZN2nn6insortIPNS_6UpdateIPNS_2BBEEENS_4WrapIZNS_8legalizeIS3_EEvPNS1_IT_EEEUlRKS4_SC_E_EEEEvS8_S8_T0_	void nn::insort<nn::Update<nn::BB*>*, nn::Wrap<void nn::legalize<nn::BB*>(nn::Update<nn::BB*>*)::'lambda'(nn::Update<nn::BB*> const&, nn::Update<nn::BB*> const&)>>(nn::Update<nn::BB*>*, nn::Update<nn::BB*>*, nn::Wrap<void nn::legalize<nn::BB*>(nn::Update<nn::BB*>*)::'lambda'(nn::Update<nn::BB*> const&, nn::Update<nn::BB*> const&)>)
#
# tools/corpus_sources/reference_defects/insort_composite.cpp, g++ 13.3.0.
# The same defect one declarator deeper: `insort(Update<I>*, Update<I>*, C)`, so the
# first two parameters are `nn::Update<nn::Update<nn::BB*>*>*`. `SA_` is the entry
# `P N S1_ I T_ E E` contributed inside `legalize`'s signature -- a composite built
# *over* the parameter rather than the parameter itself, which the mangler reuses
# across scopes for the same reason. llvm-cxxfilt 18 prints `nn::Update<nn::BB*>*`;
# GNU c++filt 2.42 agrees with the declaration.
_ZN2nn6insortIPNS_6UpdateIPNS_2BBEEENS_4WrapIZNS_8legalizeIS3_EEvPNS1_IT_EEEUlRKS4_SC_E_EEEEvSA_SA_T0_	void nn::insort<nn::Update<nn::BB*>*, nn::Wrap<void nn::legalize<nn::BB*>(nn::Update<nn::BB*>*)::'lambda'(nn::Update<nn::BB*> const&, nn::Update<nn::BB*> const&)>>(nn::Update<nn::Update<nn::BB*>*>*, nn::Update<nn::Update<nn::BB*>*>*, nn::Wrap<void nn::legalize<nn::BB*>(nn::Update<nn::BB*>*)::'lambda'(nn::Update<nn::BB*> const&, nn::Update<nn::BB*> const&)>)
#
# tools/corpus_sources/reference_defects/generic_lambda.cpp, g++ 13.3.0.
# `operator()<int>` of a generic lambda takes `int`. llvm-cxxfilt 18 prints `auto`; GNU
# c++filt 2.42 agrees with the declaration.
_ZZN6modern13genericLambdaEvENKUlT_E_clIiEEDaS0_	auto modern::genericLambda()::'lambda'(auto)::operator()<int>(int) const
#
# tools/corpus_sources/reference_defects/member_template_lambda.cpp, g++ 13.3.0 and
# clang++ 18.1.3 identically. The other direction of the same defect: here it is the
# *closure's* `auto` that is written as a back reference, `S1_`, to the `T_` entry `g`'s
# own signature contributed, because both compilers canonicalise a template type
# parameter by level and index and the closure's implicit parameter is `T_` too. Read
# under the closure the entry is its `auto`; llvm-cxxfilt 18 prints `int`, what the
# entry was bound to where it was made, and spells `[](auto x)` as `'lambda'(int)`. GNU
# c++filt 2.42 agrees with the declaration on all four. `operator()<int>` takes `int`
# either way, as the entry above says. The libcxxabi corpus has the pack shape as
# `_ZN1XIZ1fIiEvOT_EUlS2_DpT0_E_EclIJEEEvDpT_`, and `tests/test_conformance.py` names it
# among the nine vectors there that record the reference's own reading.
_ZZN1S1gIiEEvT_ENKUlS1_E_clIiEEDaS1_	auto void S::g<int>(int)::'lambda'(auto)::operator()<int>(int) const
_ZZN1S1gIiEEvT_ENKUliS1_E_clIiEEDaiS1_	auto void S::g<int>(int)::'lambda'(int, auto)::operator()<int>(int, int) const
_ZZN1S1gIiEEvT_ENKUlRKS1_E_clIiEEDaS3_	auto void S::g<int>(int)::'lambda'(auto const&)::operator()<int>(int const&) const
_ZZ1fIiEvOT_ENKUlS1_DpT0_E_clIiJEEEDaS1_S3_	auto void f<int>(int&&)::'lambda'(auto&&, auto...)::operator()<int>(int&&) const
#
# The `Ty` form of the entry above, from tools/corpus_sources/modern.cpp compiled by
# clang++ 18.1.3: the lambda declares its parameter and `S0_` names it. It left
# `itanium-real-world.txt`, whose expected column is llvm-cxxfilt's and which read `$T`
# here -- the parameter, not the `int` `operator()` was instantiated with.
_ZZN6modern13genericLambdaEvENKUlTyT_E_clIiEEDaS0_	auto modern::genericLambda()::'lambda'<typename $T>($T)::operator()<int>(int) const
#
# tools/corpus_sources/reference_defects/prepare_execution.cpp, g++ 13.3.0.
# `Prep(Callable&)`, and `Callable` is the closure declared in `callit`, so the parameter
# is that closure type. Both llvm-cxxfilt 18 and GNU c++filt 2.42 print `void (&)()` --
# `callit`'s own `F`, which is what `T_` meant where the entry was made. The same shape
# appears in the shipped libstdc++ as `std::once_flag::_Prepare_execution`.
_ZZN5Outer4PrepC4IZ6callitIRFvvEEvOT_EUlvE_EERS5_ENUlvE_4_FUNEv	Outer::Prep::Prep<void callit<void (&)()>(void (&)())::'lambda'()>(void callit<void (&)()>(void (&)())::'lambda'()&)::'lambda'()::_FUN()
#
# tools/corpus_sources/reference_defects/auto_marshall.cpp, clang++ 18.1.3.
# A non-type template parameter whose type mentions the earlier type parameters -- which
# is what puts `T_` in the table -- and whose value is a function specialisation whose
# signature back-references it. llvm-cxxfilt 18 doubles the wrapper, reading
# `am::Bindable<am::Bindable<am::TemplateName>>`; GNU c++filt 2.42 refuses the name.
_ZN2am23makeMatcherAutoMarshallINS_8BindableINS_12TemplateNameEEENS_7MatcherIS2_EETnPFT_N5llvmx8ArrayRefIPKT0_EEEXadL_ZNS_18makeAllOfCompositeIS2_EENS1_IS6_EENS8_IPKNS4_IS6_EEEEEEEEii	int am::makeMatcherAutoMarshall<am::Bindable<am::TemplateName>, am::Matcher<am::TemplateName>, &am::Bindable<am::TemplateName> am::makeAllOfComposite<am::TemplateName>(llvmx::ArrayRef<am::Matcher<am::TemplateName> const*>)>(int)
#
# libLLVM-17. `find_singleton_nested(NodeTy&&, PredTy, bool)`, so the first parameter is
# the second template argument. llvm-cxxfilt 18 reads it as `llvm::Loop&&`, taken from the
# nested `getExitBlockHelper`; GNU c++filt 2.42 agrees with us byte for byte.
_ZN4llvm21find_singleton_nestedINS_10BasicBlockENS_14iterator_rangeINS_12SuccIteratorINS_11InstructionES1_EEEEZNS_18getExitBlockHelperIS1_NS_4LoopEEESt4pairIPT_bEPKNS_8LoopBaseISA_T0_EEbEUlPS1_bE_EESC_OSE_T1_b	std::pair<llvm::BasicBlock*, bool> llvm::find_singleton_nested<llvm::BasicBlock, llvm::iterator_range<llvm::SuccIterator<llvm::Instruction, llvm::BasicBlock>>, std::pair<llvm::BasicBlock*, bool> llvm::getExitBlockHelper<llvm::BasicBlock, llvm::Loop>(llvm::LoopBase<llvm::BasicBlock, llvm::Loop> const*, bool)::'lambda'(llvm::BasicBlock*, bool)>(llvm::iterator_range<llvm::SuccIterator<llvm::Instruction, llvm::BasicBlock>>&&, std::pair<llvm::BasicBlock*, bool> llvm::getExitBlockHelper<llvm::BasicBlock, llvm::Loop>(llvm::LoopBase<llvm::BasicBlock, llvm::Loop> const*, bool)::'lambda'(llvm::BasicBlock*, bool), bool)
#
# libclang-cpp-18. One of 227 instantiations of the shape above; GNU c++filt refuses
# every one of them, so the reduced clang case is what carries the evidence.
_ZN5clang12ast_matchers7dynamic8internal23makeMatcherAutoMarshallINS0_8internal15BindableMatcherINS_12TemplateNameEEENS4_7MatcherIS6_EETnPFT_N4llvm8ArrayRefIPKT0_EEEXadL_ZNS4_18makeAllOfCompositeIS6_EENS5_ISA_EENSC_IPKNS8_ISA_EEEEEEEESt10unique_ptrINS2_17MatcherDescriptorESt14default_deleteISQ_EENS4_16VariadicFunctionISA_SD_XT1_EEENSB_9StringRefE	std::unique_ptr<clang::ast_matchers::dynamic::internal::MatcherDescriptor, std::default_delete<clang::ast_matchers::dynamic::internal::MatcherDescriptor>> clang::ast_matchers::dynamic::internal::makeMatcherAutoMarshall<clang::ast_matchers::internal::BindableMatcher<clang::TemplateName>, clang::ast_matchers::internal::Matcher<clang::TemplateName>, &clang::ast_matchers::internal::BindableMatcher<clang::TemplateName> clang::ast_matchers::internal::makeAllOfComposite<clang::TemplateName>(llvm::ArrayRef<clang::ast_matchers::internal::Matcher<clang::TemplateName> const*>)>(clang::ast_matchers::internal::VariadicFunction<clang::ast_matchers::internal::BindableMatcher<clang::TemplateName>, clang::ast_matchers::internal::Matcher<clang::TemplateName>, &clang::ast_matchers::internal::BindableMatcher<clang::TemplateName> clang::ast_matchers::internal::makeAllOfComposite<clang::TemplateName>(llvm::ArrayRef<clang::ast_matchers::internal::Matcher<clang::TemplateName> const*>)>, llvm::StringRef)
#
# libLLVM-20. `std::__find_if(_Iterator, _Iterator, _Predicate, random_access_iterator_tag)`,
# so the third parameter is the predicate. llvm-cxxfilt 18 reads it as
# `llvm::InstructionCost`, the return type of the enclosing `processBuildVector`; GNU
# c++filt 2.42 agrees with us byte for byte.
_ZSt9__find_ifIPKPN4llvm5ValueEN9__gnu_cxx5__ops12_Iter_negateIZNS0_13slpvectorizer7BoUpSLP18processBuildVectorINS9_20ShuffleCostEstimatorENS0_15InstructionCostEJNS0_19TargetTransformInfoENS0_8ArrayRefIS2_EES9_NS0_15SmallPtrSetImplIS2_EEEEET0_PKNS9_9TreeEntryEDpRT1_EUlS2_E_EEET_SR_SR_SI_St26random_access_iterator_tag	llvm::Value* const* std::__find_if<llvm::Value* const*, __gnu_cxx::__ops::_Iter_negate<llvm::InstructionCost llvm::slpvectorizer::BoUpSLP::processBuildVector<llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator, llvm::InstructionCost, llvm::TargetTransformInfo, llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP, llvm::SmallPtrSetImpl<llvm::Value*>>(llvm::slpvectorizer::BoUpSLP::TreeEntry const*, llvm::TargetTransformInfo&, llvm::ArrayRef<llvm::Value*>&, llvm::slpvectorizer::BoUpSLP&, llvm::SmallPtrSetImpl<llvm::Value*>&)::'lambda'(llvm::Value*)>>(llvm::Value* const*, llvm::Value* const*, __gnu_cxx::__ops::_Iter_negate<llvm::InstructionCost llvm::slpvectorizer::BoUpSLP::processBuildVector<llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator, llvm::InstructionCost, llvm::TargetTransformInfo, llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP, llvm::SmallPtrSetImpl<llvm::Value*>>(llvm::slpvectorizer::BoUpSLP::TreeEntry const*, llvm::TargetTransformInfo&, llvm::ArrayRef<llvm::Value*>&, llvm::slpvectorizer::BoUpSLP&, llvm::SmallPtrSetImpl<llvm::Value*>&)::'lambda'(llvm::Value*)>, std::random_access_iterator_tag)
#
# tools/corpus_sources/features.cpp, clang++ 18.1.3 and g++ 13.3.0 at every standard.
# `template <template <typename, int> class C, typename T> C<T, 3> templateTemplate(T)`,
# so the parameter is `T` -- `int` -- and `S4_` names the `T0_` entry rather than the
# `Holder<int, 3>` the application produced. llvm-cxxfilt 18.1.3 reads it as
# `outer::inner::Holder<int, 3>`; llvm-cxxfilt 20.1.2 and GNU c++filt 2.42 both agree
# with the declaration, and with this.
#
# The name is excluded from regeneration so that it cannot re-record 18's answer.
_Z16templateTemplateIN5outer5inner6HolderEiET_IT0_Li3EES4_	outer::inner::Holder<int, 3> templateTemplate<outer::inner::Holder, int>(int)
#
# tools/corpus_sources/reference_defects/value_init_new.cpp, g++ 13.3.0 and clang++
# 18.1.3 identically. `decltype(new T())`: the empty parenthesised initialiser is
# `pi E`, and it is what tells value-initialisation from `new T`, which leaves the
# object indeterminate. llvm-cxxfilt 18.1.3 and 20.1.2 read the initialiser and print
# nothing for it, `decltype(new int)` -- the other expression. GNU c++filt 2.42 prints
# the brackets, and so does this.
_Z10value_initIiEDTnw_T_piEES0_	decltype(new int()) value_init<int>(int)
#
# tools/corpus_sources/reference_defects/division.cpp, g++ 13.3.0 and clang++ 18.1.3
# identically. `I<(sizeof(T) + 1) / 2>`: llvm-cxxfilt 18.1.3 and 20.1.2 carry `dv` in
# their operator table at the precedence of an assignment, so the sum it divides is not
# bracketed and the name prints as `sizeof (int) + 1 / 2` -- a different expression.
# GNU c++filt 2.42 prints `((sizeof (int))+(1))/(2)`, and this brackets by the
# precedence `/` has.
_Z9half_moreIiEv1IIXdvplstT_Li1ELi2EEE	void half_more<int>(I<(sizeof (int) + 1) / 2>)
#
# libstdc++ 13's <format>, compiled by g++ 13.3.0 from any program that calls
# `std::format`: `template <class Visitor> decltype(auto) basic_format_arg::_M_visit(
# Visitor&& vis, _Arg_t)` instantiated over the closure `_M_format_arg` declares as
# `[&](auto& arg)`. The closure's `auto` is written as `UlRT_E_`, and the parameter
# `Visitor&&` as `OS9_` -- the closure type, which is what the template argument is.
# llvm-cxxfilt 18.1.3 and 20.1.2 resolve `S9_` to the closure's `auto` and print the
# parameter as `auto&&`: a parameter of a type no declaration has. GNU c++filt 2.42
# prints the closure, and so does this. The same defect as member_template_lambda.cpp,
# in a name every program that formats a string carries.
_ZNSt16basic_format_argISt20basic_format_contextINSt8__format10_Sink_iterIcEEcEE8_M_visitIZNS1_19_Formatting_scannerIS3_cE13_M_format_argEmEUlRT_E_EEDcOS9_NS1_6_Arg_tE	decltype(auto) std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char>>::_M_visit<std::__format::_Formatting_scanner<std::__format::_Sink_iter<char>, char>::_M_format_arg(unsigned long)::'lambda'(auto&)>(std::__format::_Formatting_scanner<std::__format::_Sink_iter<char>, char>::_M_format_arg(unsigned long)::'lambda'(auto&)&&, std::__format::_Arg_t)
#
# libstdc++ 13's <format> again, compiled by clang++ 18.1.3 this time, from any program
# that formats a double: `template <class C, class F> static void
# __formatter_fp<char>::_S_resize_and_overwrite(basic_string<C>&, size_t, F)`,
# instantiated over the closure `format<double, _Sink_iter<char>>` declares. The
# closure is a local entity, its enclosing function's signature contributes a `T_`
# entry to the table -- `double`, the `T_` of `format` -- and the parameter
# `basic_string<C>&` is then written as `SA_`, the same entry, which under
# `_S_resize_and_overwrite`'s own arguments is `char`. llvm-cxxfilt 18.1.3 and 20.1.2
# print `basic_string<double, char_traits<double>, allocator<double>>&`, a type
# libstdc++ does not instantiate, and the closure parameter `S7_` as `_Sink_iter<char>`.
# GNU c++filt 2.42 prints the declaration, and so does this.
_ZNSt8__format14__formatter_fpIcE23_S_resize_and_overwriteIcZNKS1_6formatIdNS_10_Sink_iterIcEEEENSt20basic_format_contextIT0_cE8iteratorET_RS8_EUlPcmE_EEvRNSt7__cxx1112basic_stringISA_St11char_traitsISA_ESaISA_EEEmS7_	void std::__format::__formatter_fp<char>::_S_resize_and_overwrite<char, std::basic_format_context<std::__format::_Sink_iter<char>, char>::iterator std::__format::__formatter_fp<char>::format<double, std::__format::_Sink_iter<char>>(double, std::basic_format_context<std::__format::_Sink_iter<char>, char>&) const::'lambda'(char*, unsigned long)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long, std::basic_format_context<std::__format::_Sink_iter<char>, char>::iterator std::__format::__formatter_fp<char>::format<double, std::__format::_Sink_iter<char>>(double, std::basic_format_context<std::__format::_Sink_iter<char>, char>&) const::'lambda'(char*, unsigned long))
#
# ceres-solver 2.2.0's parallel_invoke.h, compiled by Apple clang for the Homebrew bottle:
# `template <typename F> void ParallelInvoke(ContextImpl*, int, int, int, F&& function,
# int)` declares `auto task = [context, shared_state, num_threads, &function](auto&
# task_copy) { ... }` and calls it with itself, `task_copy(task_copy)`, from inside a
# lambda that captured it by value. The generic lambda's `auto&` is written `RSD_`, the
# `T_` entry the enclosing `F&&` contributed, and the instantiation's parameter as
# `SF_`, the closure. llvm-cxxfilt 18.1.3 resolves both under `ParallelInvoke`'s own
# argument and prints the lambda's parameter as `'lambda'(int)&` and the call
# operator's the same; GNU c++filt 2.42 prints `auto:1&` for the first and
# `{lambda(int)#1}&` for the second. Neither is a parameter the source declares. The
# bottle's libceres carries this closure 7,573 times.
#
# The row is the bottle's symbol as the bottle spells it, Mach-O underscore included,
# because the second template argument -- libc++'s `__func<_Fp, _Alloc, _Rp(_ArgTypes...)>`
# takes `allocator<_Fp>`, the closure -- is written `SK_`, which is the closure's entry
# only under Apple's `auto` rule (`ItaniumOptions.undeduced_auto_substitution`), the
# rule a `__Z` name is read by. Without the underscore the common rule applies, under
# which `SK_` is the entry before, `std::__1::allocator` itself. Nothing in the grammar
# calls that shape wrong -- a bare template is what the argument for a template
# template parameter looks like -- so no retry can catch it; the underscore is what
# selects the rule, and the row spells what libc++ declares.
__ZNKSt3__110__function6__funcIZZN5ceres8internal14ParallelInvokeIZNKS3_21PartitionedMatrixViewILi2ELi2ELi2EE27RightMultiplyAndAccumulateEEPKdPdEUliE_EEvPNS3_11ContextImplEiiiOT_iENKUlRSD_E_clIKSG_EEDaSF_EUlvE_NS_9allocatorISK_EEFvvEE11target_typeEv	std::__1::__function::__func<auto void ceres::internal::ParallelInvoke<ceres::internal::PartitionedMatrixView<2, 2, 2>::RightMultiplyAndAccumulateE(double const*, double*) const::'lambda'(int)>(ceres::internal::ContextImpl*, int, int, int, ceres::internal::PartitionedMatrixView<2, 2, 2>::RightMultiplyAndAccumulateE(double const*, double*) const::'lambda'(int)&&, int)::'lambda'(auto&)::operator()<'lambda'(auto&) const>('lambda'(auto&) const&) const::'lambda'(), std::__1::allocator<auto void ceres::internal::ParallelInvoke<ceres::internal::PartitionedMatrixView<2, 2, 2>::RightMultiplyAndAccumulateE(double const*, double*) const::'lambda'(int)>(ceres::internal::ContextImpl*, int, int, int, ceres::internal::PartitionedMatrixView<2, 2, 2>::RightMultiplyAndAccumulateE(double const*, double*) const::'lambda'(int)&&, int)::'lambda'(auto&)::operator()<'lambda'(auto&) const>('lambda'(auto&) const&) const::'lambda'()>, void ()>::target_type() const
#
# folly's Benchmark.h, from the same bottle: `template <typename Lambda> typename
# std::enable_if<std::is_invocable_v<Lambda, unsigned>>::type addBenchmark(std::string,
# std::string, Lambda&&)` instantiated over the closure that its own one-argument
# overload declares. The return type's `is_invocable_v<Lambda, unsigned>` is written with
# `T_`, and llvm-cxxfilt 18.1.3 resolves it to `$_4&`, the argument of the *inner*
# instantiation the closure lives in, printing `is_invocable_v<folly::$_4&, unsigned
# int>`; the declaration's `Lambda` is the closure, which this prints.
_ZNKSt3__110__function6__funcIZN5folly6detail17BenchmarkingStateINS_6chrono12steady_clockEE12addBenchmarkIZNS7_12addBenchmarkIRNS2_3$_4EEENS_9enable_ifIXsr5follyE14is_invocable_vIT_EEvE4typeENS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEESL_OSD_EUljE_EENSC_IXsr5follyE14is_invocable_vISD_jEEvE4typeESL_SL_SM_EUljE_NSJ_ISQ_EEFNS3_12TimeIterDataEjEE11target_typeEv	std::__1::__function::__func<std::__1::enable_if<folly::is_invocable_v<std::__1::enable_if<folly::is_invocable_v<folly::$_4&>, void>::type folly::detail::BenchmarkingState<std::__1::chrono::steady_clock>::addBenchmark<folly::$_4&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, folly::$_4&)::'lambda'(unsigned int), unsigned int>, void>::type folly::detail::BenchmarkingState<std::__1::chrono::steady_clock>::addBenchmark<std::__1::enable_if<folly::is_invocable_v<folly::$_4&>, void>::type folly::detail::BenchmarkingState<std::__1::chrono::steady_clock>::addBenchmark<folly::$_4&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, folly::$_4&)::'lambda'(unsigned int)>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::enable_if<folly::is_invocable_v<folly::$_4&>, void>::type folly::detail::BenchmarkingState<std::__1::chrono::steady_clock>::addBenchmark<folly::$_4&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, folly::$_4&)::'lambda'(unsigned int)&&)::'lambda'(unsigned int), std::__1::allocator<std::__1::enable_if<folly::is_invocable_v<std::__1::enable_if<folly::is_invocable_v<folly::$_4&>, void>::type folly::detail::BenchmarkingState<std::__1::chrono::steady_clock>::addBenchmark<folly::$_4&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, folly::$_4&)::'lambda'(unsigned int), unsigned int>, void>::type folly::detail::BenchmarkingState<std::__1::chrono::steady_clock>::addBenchmark<std::__1::enable_if<folly::is_invocable_v<folly::$_4&>, void>::type folly::detail::BenchmarkingState<std::__1::chrono::steady_clock>::addBenchmark<folly::$_4&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, folly::$_4&)::'lambda'(unsigned int)>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::enable_if<folly::is_invocable_v<folly::$_4&>, void>::type folly::detail::BenchmarkingState<std::__1::chrono::steady_clock>::addBenchmark<folly::$_4&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, folly::$_4&)::'lambda'(unsigned int)&&)::'lambda'(unsigned int)>, folly::detail::TimeIterData (unsigned int)>::target_type() const
#
# Apache Arrow's visit_data_inline.h, from the Homebrew bottle: `template <typename
# ValidFunc, typename NullFunc> static void ArraySpanInlineVisitor<T>::VisitVoid(const
# ArraySpan&, ValidFunc&&, NullFunc&&)`, instantiated over two closures declared inside
# `VisitArrayValuesInline`. That inner function's own second parameter, `T0_&&`, entered
# the table under its own arguments -- where `T0_` is its `'lambda'(long long)` -- and
# `VisitVoid`'s third parameter is written `S14_`, the same entry, read under
# `VisitVoid`'s arguments, where `T0_` is `NullFunc`: the `'lambda'()` the declaration
# names. llvm-cxxfilt 18.1.3 and c++filt 2.42 both print `'lambda'(long long)&&`, the
# inner function's parameter, which is not what `VisitVoid` takes.
_ZZN5arrow8internal22ArraySpanInlineVisitorINS_13TimestampTypeEvE9VisitVoidIZNS_7compute8internalL22VisitArrayValuesInlineIS2_ZNS6_10applicator26ScalarUnaryNotNullStatefulINS_11BooleanTypeES2_NS6_12_GLOBAL__N_110IsLeapYearINSt3__16chrono8durationIxNSD_5ratioILl1ELl1000000000EEEEENS6_14ZonedLocalizerEEEE9ArrayExecISA_vE4ExecERKSL_PNS5_13KernelContextERKNS_9ArraySpanEPNS5_10ExecResultEEUlxE_ZNSN_4ExecESP_SR_SU_SW_EUlvE_EENSD_9enable_ifIXsr3std7is_sameIDTcl16return_type_impladsr3std5decayIT0_E4typeEonclEEvEE5valueEvE4typeESU_OS10_OT1_EUlxE_SY_EEvSU_OT_S14_ENKUlxE_clEx	void arrow::internal::ArraySpanInlineVisitor<arrow::TimestampType, void>::VisitVoid<std::__1::enable_if<std::is_same<decltype(return_type_impl(&std::decay<arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'(long long)>::type::operator())), void>::value, void>::type arrow::compute::internal::VisitArrayValuesInline<arrow::TimestampType, arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'(long long), arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'()>(arrow::ArraySpan const&, arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'(long long)&&, arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'()&&)::'lambda'(long long), arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'()>(arrow::ArraySpan const&, std::__1::enable_if<std::is_same<decltype(return_type_impl(&std::decay<arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'(long long)>::type::operator())), void>::value, void>::type arrow::compute::internal::VisitArrayValuesInline<arrow::TimestampType, arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'(long long), arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'()>(arrow::ArraySpan const&, arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'(long long)&&, arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'()&&)::'lambda'(long long)&&, arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>>::ArrayExec<arrow::BooleanType, void>::Exec(arrow::compute::internal::applicator::ScalarUnaryNotNullStateful<arrow::BooleanType, arrow::TimestampType, arrow::compute::internal::(anonymous namespace)::IsLeapYear<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>, arrow::compute::internal::ZonedLocalizer>> const&, arrow::compute::KernelContext*, arrow::ArraySpan const&, arrow::compute::ExecResult*)::'lambda'()&&)::'lambda'(long long)::operator()(long long) const

# GCC 12 and earlier left a closure prefix out of the substitution table. The `M` that
# marks a lambda in a variable's initializer -- `ns::g3::'lambda'(...)`, written
# `2ns2g3MUl...` -- ends a <prefix>, and the prefix before it is a candidate under the
# ABI, under clang and under GCC 13 (`-fabi-version=18`); GCC 12 (`-fabi-version=17`)
# and every version before it wrote the `M` and skipped the entry, so each `S<n>_` after
# the lambda's opening is one lower than the ABI says. GCC 13 still emits the old
# spelling as an alias beside the new. Sources in
# `tools/corpus_sources/reference_defects/closure_prefix.cpp`, compiled with
# `g++ -std=c++20 -fabi-version=17 -fabi-compat-version=17`.
#
# Read by the ABI's rule, every back-reference resolves one entry early, and what
# llvm-cxxfilt 18, LLVM's main branch and c++filt 2.42 all print is
# `ns::g3::'lambda'(ns::Box<int>, ns::Box)::operator()(ns::Box, ns::Box) const` -- a
# template with no arguments, `ns::Box`, standing as a parameter type -- and for `g1`
# `operator()<int>(ns::g1, ns::Box, ns::Box)`, a variable's name as a parameter type.
# The declaration is `[](ns::Box<int> b, ns::Box<int> c)`, and the parameters of every
# instantiation below are what the source says they are.
_ZNK2ns2g3MUlNS_3BoxIiEES1_E_clES1_S1_	ns::g3::'lambda'(ns::Box<int>, ns::Box<int>)::operator()(ns::Box<int>, ns::Box<int>) const
_ZNK2ns2g1MUlT_NS_3BoxIiEES2_E_clIiEEDaS0_S2_S2_	auto ns::g1::'lambda'(auto, ns::Box<int>, ns::Box<int>)::operator()<int>(int, ns::Box<int>, ns::Box<int>) const
_ZNK2ns2g4MUlT_T0_NS_3BoxIiEES3_E_clIidEEDaS0_S1_S3_S3_	auto ns::g4::'lambda'(auto, auto, ns::Box<int>, ns::Box<int>)::operator()<int, double>(int, double, ns::Box<int>, ns::Box<int>) const
_ZNK2ns2g5MUlDpT_NS_3BoxIiEES3_E_clIJiEEEDaS1_S3_S3_	auto ns::g5::'lambda'(auto..., ns::Box<int>, ns::Box<int>)::operator()<int>(int, ns::Box<int>, ns::Box<int>) const
_ZNK2ns6nestedMUlNS_3BoxIiEEE_clES1_	ns::nested::'lambda'(ns::Box<int>)::operator()(ns::Box<int>) const
_ZZNK2ns6nestedMUlNS_3BoxIiEEE_clES1_ENKUlS1_S1_E_clES1_S1_	ns::nested::'lambda'(ns::Box<int>)::operator()(ns::Box<int>) const::'lambda'(ns::Box<int>, ns::Box<int>)::operator()(ns::Box<int>, ns::Box<int>) const

# Apple's clang leaves the closure prefix out too, in every version: Homebrew's macOS
# bottles of Apache Arrow, DuckDB and RocksDB carry 663 names that read only with the
# prefix left out and none that read only with it in, where upstream clang 13 through
# 18 -- targeting Darwin included -- enter it. The Mach-O underscore is what selects
# Apple's rule, so these rows keep theirs. Both references, reading by the ABI's rule,
# print libc++'s `__func<_Fp, _Alloc, _Rp(_ArgTypes...)>` with `_Alloc` an allocator
# of the *member* the lambda initialised, or of one of its parameters, rather than of
# the closure `function(F)` instantiates it with; and RocksDB's
# `barrier_func_ = [](const Endpoint&, const Endpoint&) -> bool` comes back with its
# second parameter as `Endpoint const`. cpp-httplib's declaration is
# `std::function<bool()> is_connection_closed = []() { return true; };`.
__ZNKSt3__110__function6__funcIN7rocksdb20RangeTreeLockManager13barrier_func_MUlRKNS2_8EndpointES6_E_ENS_9allocatorIS7_EEFbS6_S6_EE7__cloneEv	std::__1::__function::__func<rocksdb::RangeTreeLockManager::barrier_func_::'lambda'(rocksdb::Endpoint const&, rocksdb::Endpoint const&), std::__1::allocator<rocksdb::RangeTreeLockManager::barrier_func_::'lambda'(rocksdb::Endpoint const&, rocksdb::Endpoint const&)>, bool (rocksdb::Endpoint const&, rocksdb::Endpoint const&)>::__clone() const
__ZNKSt3__110__function6__funcIN14duckdb_httplib7Request20is_connection_closedMUlvE_ENS_9allocatorIS4_EEFbvEE7__cloneEv	std::__1::__function::__func<duckdb_httplib::Request::is_connection_closed::'lambda'(), std::__1::allocator<duckdb_httplib::Request::is_connection_closed::'lambda'()>, bool ()>::__clone() const

# tools/corpus_sources/reference_defects/template_template_param.cpp, g++ 13.3.0 and
# clang++ 18.1.3 identically. A different defect, and about the *count* of entries
# rather than what one of them holds: `<template-template-param> <template-args>` is two
# grammar components -- the parameter, which 5.1.10 names as a candidate in its own
# right, and the specialisation built over it, which is a <type> -- so `T_ I ... E`
# contributes two entries. llvm-cxxfilt 18 records only the second, so every index at or
# after the parameter's is one out. On `f` the shift runs off the end and it refuses the
# name; on `g` it lands one short and answers `char<int>`, which is not a type. GNU
# c++filt 2.42 agrees with the declarations. `tools/mutate.py --seed 43`.
_Z1fI1AiEvT_IT0_ES3_S3_	void f<A, int>(A<int>, A<int>, A<int>)
_Z1gI1AcEvT_IT0_ES1_IiE	void g<A, char>(A<char>, A<int>)

# tools/corpus_sources/reference_defects/inheriting_constructor.cpp, g++ 13.3.0 for the
# first four and clang++ 18.1.3 for the last two. A third defect, and the one whose two
# sides each refuse the other's output. An inheriting constructor's `<base class type>`
# is a <type>, which 5.1.10 makes a candidate; g++ enters it and clang does not, so each
# compiler's `S<n>_` counts one differently from the other's. Both parameters are
# `C::Kind`, which is what makes it visible: read under the wrong rule the second one
# comes back `C`. llvm-cxxfilt 18 implements clang's rule and refuses g++'s names
# outright; GNU c++filt 2.42 reads both parameter lists and then names the constructor
# after the base, `D::C`, which is neither compiler's declaration.
# `tools/mutate.py --seed 69`.
_ZN1DCI11CENS0_4KindE	D::D(C::Kind)
_ZN1DCI11CENS0_4KindES1_	D::D(C::Kind, C::Kind)
_ZN1DCI21CENS0_4KindE	D::D(C::Kind)
_ZN1DCI21CENS0_4KindES1_	D::D(C::Kind, C::Kind)
_ZN1DCI21CEN1C4KindE	D::D(C::Kind)
_ZN1DCI21CEN1C4KindES1_	D::D(C::Kind, C::Kind)
