Introduce a new initialization entity for lambda captures, and
specialize location information and diagnostics for this entity.

llvm-svn: 150588
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp
index 1f7580e..e99130f 100644
--- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp
+++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp
@@ -4,12 +4,15 @@
 
 class NonCopyable {
   NonCopyable(const NonCopyable&); // expected-note 2 {{implicitly declared private here}}
+public:
+  void foo() const;
 };
 
 void capture_by_copy(NonCopyable nc, NonCopyable &ncr) {
-  // FIXME: error messages should talk about capture
-  (void)[nc] { }; // expected-error{{field of type 'NonCopyable' has private copy constructor}}
-  (void)[ncr] { }; // expected-error{{field of type 'NonCopyable' has private copy constructor}}
+  (void)[nc] { }; // expected-error{{capture of variable 'nc' as type 'NonCopyable' calls private copy constructor}}
+  (void)[=] {
+    ncr.foo(); // expected-error{{capture of variable 'ncr' as type 'NonCopyable' calls private copy constructor}} 
+  }();
 }
 
 struct NonTrivial {