Open jackua22 opened 6 months ago
@jackua22: Could you please provide reproducer?
I cut the test to 30 lines. Having problems attaching tgz, not supported type. Inserting code here. === t1.cpp ===
#include <utility>
using node_index_t = int;
class Node {
public:
template<class T>
bool isType() const;
};
class Tree
{
public:
enum : node_index_t { invalid_id = -1 };
const Node* getNode(node_index_t id) const noexcept;
template<class...Ts>
bool isType(node_index_t index) const { return getNode(index)->isType<Ts...>(); }
template<class Predicate>
node_index_t find_child_by_name(node_index_t parent, const char *name, Predicate&& predicate) const;
template<class T1, class... Ts, class Predicate>
node_index_t find_child_by_name(node_index_t parent, const char *name, Predicate&& predicate) const {
return find_child_by_name(parent, name, [&](node_index_t id) {
return isType<T1, Ts...>(id) && std::forward<Predicate>(predicate)(id);
});
}
};
=== runs.sh ===
#!/bin/bash -xe
/grid/common/test/llvm-v18.1.4d1rh74_lnx86/bin/clang++ -c -stdlib=libc++ --std=c++17 t1.cpp
/grid/common/test/llvm-v18.1.4d1rh74_lnx86/bin/clang-tidy '--checks=cppcoreguidelines-missing-std-forward' t1.cpp -- -std=c++17 -stdlib=libc++
Seems to work in main
: https://godbolt.org/z/soY5xMEM4
tidy crashes. clang++ there is to prove that the code is valid. Compilation is OK, but static analysis fails.
Is there any update on the clang-tidy crash?
Can't reproduce crash...
I ran the latest clang-tidy we have in-house, llvm-v18.1.6d1rh74_lnx86/bin/clang-tidy, and it crashed as before. Which exact version did you run, and how can we get this non-crashing version?
clang-tidy llvm-v18.1.4 crashes with an attached stack. It is a very popular crash; about 50 files failed with the same stack, and the priority of the issue is high. ua_Debug_corun_src_coInit.C.log
There is a second, similar crash, it can be useful. ua_Platinum_CompilerRT_src_smdbUtil.h.log