Closed
Description
Running the recently introduced clang-tidy check modernize-min-max-use-initializer-list
on the following valid code snippet triggers an assertion:
clang-tidy: /LLVM/llvm-project/llvm/include/llvm/Support/Casting.h:706: auto llvm::cast_if_present(Y*) [with X = clang::Expr; Y = const clang::Stmt]: Assertion `isa<X>(Val) && "cast_if_present<Ty>() argument of incompatible type!"' failed.
#include <algorithm>
int x();
int y();
int z();
int foo()
{
return std::max(x(), std::max(y(), z()));
}
Stacktrace attached
Crash.txt