ClangPlugins: Remove confusing hasType check for lambda capture types
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run

This check asserts that templated types will never escape. Which doesn't
hold up at all in practice.
This commit is contained in:
Andrew Kaster 2024-12-09 19:51:05 -07:00 committed by Andreas Kling
parent 2f38c83caf
commit 85b87508bf
Notes: github-actions[bot] 2024-12-10 06:13:49 +00:00

View file

@ -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);
}