Issue |
91982
|
Summary |
[clang-tidy] modernize-min-max-use-initializer-list
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
VReichelt
|
Running the recently intoroduced 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() const;
int y() const;
int z() const;
int foo()
{
return std::max(x(), std::max(y(), z()));
}
```
Stacktrace attached
[Crash.txt](https://github.com/llvm/llvm-project/files/15296684/Crash.txt)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs