[PATCH] D28467: [Sema] Add warning for unused lambda captures

Malcolm Parsons via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 13 08:40:33 PST 2017


malcolm.parsons added a comment.

http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/1122/steps/bootstrap%20clang/logs/stdio

  /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm/lib/Analysis/ValueTracking.cpp:1116:17: error: lambda capture 'BitWidth' is not used [-Werror,-Wunused-lambda-capture]
      auto KOF = [BitWidth](const APInt &KnownOne, unsigned ShiftAmt) {
                  ^
  /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm/lib/Analysis/ValueTracking.cpp:1127:17: error: lambda capture 'BitWidth' is not used [-Werror,-Wunused-lambda-capture]
      auto KZF = [BitWidth](const APInt &KnownZero, unsigned ShiftAmt) {
                  ^
  /home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm/lib/Analysis/ValueTracking.cpp:1131:17: error: lambda capture 'BitWidth' is not used [-Werror,-Wunused-lambda-capture]
      auto KOF = [BitWidth](const APInt &KnownOne, unsigned ShiftAmt) {
                  ^
  3 errors generated.

The warnings are correct.

Should I remove the unused lambda captures or revert this changeset?


Repository:
  rL LLVM

https://reviews.llvm.org/D28467





More information about the cfe-commits mailing list