aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures-find-lambda-crash.cpp
blob: 4d9edb75b7ff367fdab7d3134e9e1c63dbe01e3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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));
}