
Recently C++ snippet included in this patch popped up at least twice in different regression contexts: https://github.com/llvm/llvm-project/issues/56262 and https://reviews.llvm.org/D123300 It appears that Clang users rely on HALO so adding C++ example coming originally from Gor Nishanov to tests should help in avoiding similar regressions in future. Differential Revision: https://reviews.llvm.org/D129279
11 lines
229 B
C++
11 lines
229 B
C++
#pragma once
|
|
|
|
namespace std {
|
|
template <class InputIterator, class T>
|
|
T accumulate(InputIterator first, InputIterator last, T init) {
|
|
for (; first != last; ++first)
|
|
init = init + *first;
|
|
return init;
|
|
}
|
|
} // namespace std
|