From 85b87508bf1d3e6a92deced06776ceaada19ef66 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Mon, 9 Dec 2024 19:51:05 -0700 Subject: [PATCH] ClangPlugins: Remove confusing hasType check for lambda capture types This check asserts that templated types will never escape. Which doesn't hold up at all in practice. --- Meta/Lagom/ClangPlugins/LambdaCapturePluginAction.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Meta/Lagom/ClangPlugins/LambdaCapturePluginAction.cpp b/Meta/Lagom/ClangPlugins/LambdaCapturePluginAction.cpp index a0073ee14ea..976909bb945 100644 --- a/Meta/Lagom/ClangPlugins/LambdaCapturePluginAction.cpp +++ b/Meta/Lagom/ClangPlugins/LambdaCapturePluginAction.cpp @@ -84,12 +84,7 @@ public: unless(hasParent( // ::operator()(...) cxxOperatorCallExpr(has(declRefExpr(to(equalsBoundNode("lambda")))))))))), - parmVarDecl( - allOf( - // It's important that the parameter has a RecordType, as a templated type can never escape its function - hasType(cxxRecordDecl()), - hasAnnotation("serenity::escaping"))) - .bind("lambda-param-ref")))), + parmVarDecl(hasAnnotation("serenity::escaping")).bind("lambda-param-ref")))), this); }