Ver Fonte

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.
Andrew Kaster há 7 meses atrás
pai
commit
85b87508bf
1 ficheiros alterados com 1 adições e 6 exclusões
  1. 1 6
      Meta/Lagom/ClangPlugins/LambdaCapturePluginAction.cpp

+ 1 - 6
Meta/Lagom/ClangPlugins/LambdaCapturePluginAction.cpp

@@ -84,12 +84,7 @@ public:
                                 unless(hasParent(
                                     // <lambda struct>::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);
     }