From 87a036259bb47624f9257b1d247fd50162b2734d Mon Sep 17 00:00:00 2001 From: Malcolm Parsons Date: Fri, 13 Jan 2017 15:01:06 +0000 Subject: [Sema] Add warning for unused lambda captures Summary: Warn when a lambda explicitly captures something that is not used in its body. The warning is part of -Wunused and can be enabled with -Wunused-lambda-capture. Reviewers: rsmith, arphaman, jbcoe, aaron.ballman Subscribers: Quuxplusone, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D28467 llvm-svn: 291905 --- clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp') diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp index 1dbcbf49803..a8b40249f0f 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 %s -Wunused -verify +// RUN: %clang_cc1 -std=c++11 %s -Wunused -Wno-unused-lambda-capture -verify struct MoveOnly { MoveOnly(MoveOnly&&); -- cgit v1.2.3