]> granicus.if.org Git - clang/commitdiff
[analyzer] Added a missing test case for r251289.
authorGabor Horvath <xazax.hun@gmail.com>
Mon, 26 Oct 2015 17:42:14 +0000 (17:42 +0000)
committerGabor Horvath <xazax.hun@gmail.com>
Mon, 26 Oct 2015 17:42:14 +0000 (17:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251313 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/lambdas.cpp

index 15100be32d671e2103cc46c22b6101e372749ffc..18b2e416315bc725ae083dea28faeef0a7a865fc 100644 (file)
@@ -176,6 +176,19 @@ void inlineDefensiveChecks() {
   (void)p;
 }
 
+
+template<typename T>
+void callLambda(T t) {
+  t();
+}
+
+struct DontCrash {
+  int x;
+  void f() {
+    callLambda([&](){ ++x; });
+  }
+};
+
 // CHECK: [B2 (ENTRY)]
 // CHECK:   Succs (1): B1
 // CHECK: [B1]