================
@@ -129,15 +129,19 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder
*Finder) {
unless(anyOf(hasAncestor(typeLoc()),
hasAncestor(expr(hasUnevaluatedContext())))));
+ auto StaticCast = cxxStaticCastExpr(
+ hasSourceExpression(declRefExpr(to(equalsBoundNode("param")))));
----------------
5chmidti wrote:
Checkout https://godbolt.org/z/xncofxfdd (and maybe add the examples as test
cases)
It's possible to match the type of the function parameter to that of the cast
if it is written, however, not an instantiation dependent type like when using
type-traits to add the reference.
I think this shortcoming is worth it if we can ensure that the `static_cast` is
only about being explicit.
https://github.com/llvm/llvm-project/pull/99477
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits