xref: /minix3/external/bsd/llvm/dist/clang/test/Analysis/lambdas.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -fsyntax-only -analyze -analyzer-checker=debug.DumpCFG %s > %t 2>&1
2*f4a2713aSLionel Sambuc // RUN: FileCheck --input-file=%t %s
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc struct X { X(const X&); };
f(X x)5*f4a2713aSLionel Sambuc void f(X x) { (void) [x]{}; }
6*f4a2713aSLionel Sambuc 
7*f4a2713aSLionel Sambuc // CHECK: [B2 (ENTRY)]
8*f4a2713aSLionel Sambuc // CHECK:   Succs (1): B1
9*f4a2713aSLionel Sambuc // CHECK: [B1]
10*f4a2713aSLionel Sambuc // CHECK:   1: x
11*f4a2713aSLionel Sambuc // CHECK:   2: [B1.1] (ImplicitCastExpr, NoOp, const struct X)
12*f4a2713aSLionel Sambuc // CHECK:   3: [B1.2] (CXXConstructExpr, struct X)
13*f4a2713aSLionel Sambuc // CHECK:   4: [x]     {
14*f4a2713aSLionel Sambuc // CHECK:    }
15*f4a2713aSLionel Sambuc // CHECK:   5: (void)[B1.4] (CStyleCastExpr, ToVoid, void)
16*f4a2713aSLionel Sambuc // CHECK:   Preds (1): B2
17*f4a2713aSLionel Sambuc // CHECK:   Succs (1): B0
18*f4a2713aSLionel Sambuc // CHECK: [B0 (EXIT)]
19*f4a2713aSLionel Sambuc // CHECK:   Preds (1): B1
20*f4a2713aSLionel Sambuc 
21