Files
clang-p2996/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures-find-lambda-crash.cpp
2024-12-20 10:18:08 -08:00

17 lines
288 B
C++

// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify %s
// expected-no-diagnostics
struct Foo {
int x;
int y;
Foo(int x, int y) : x(x) , y(y) { }
~Foo() { }
};
Foo bar(const Foo&);
void foo() {
int x = 7;
int y = 5;
bar(Foo(x, y));
}