llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures-co_await-assertion-failure.cpp
Ryosuke Niwa 2d51705941
[webkit.UncountedLambdaCapturesChecker] Assertion failure with coroutine body (#165650)
Fix the assertion failure in TrivialFunctionAnalysis::isTrivialImpl with
a coroutine body by caching the result with WithCachedResult.
2025-11-05 14:59:50 -08:00

12 lines
253 B
C++

// 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);
}();
}