Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,10 @@ class TrivialFunctionAnalysisVisitor
return WithCachedResult(CS, [&]() { return VisitChildren(CS); });
}

bool VisitCoroutineBodyStmt(const CoroutineBodyStmt *CBS) {
return WithCachedResult(CBS, [&]() { return VisitChildren(CBS); });
}

bool VisitReturnStmt(const ReturnStmt *RS) {
// A return statement is allowed as long as the return value is trivial.
if (auto *RV = RS->getRetValue())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.UncountedLambdaCapturesChecker -std=c++20 -verify %s
// expected-no-diagnostics

template<typename Arg>
void foo(Arg&& arg)
{
[&]{
co_await [&](auto&&... args) {
}(arg);
}();
}
Loading