OSDN Git Service

Fix for unused-lambda-capture warning
authorTakuto Ikuta <tikuta@google.com>
Mon, 5 Nov 2018 14:32:02 +0000 (23:32 +0900)
committerTakuto Ikuta <tikuta@google.com>
Mon, 5 Nov 2018 22:45:03 +0000 (22:45 +0000)
This is re-land of
https://swiftshader-review.googlesource.com/c/SwiftShader/+/21848

bug: chromium:681136
Change-Id: I11ca3b0f3ccd00ff93cf5eec0e342b49d2ce1f99
Reviewed-on: https://swiftshader-review.googlesource.com/c/22289
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Takuto Ikuta <tikuta@google.com>
CMakeLists.txt
third_party/subzero/src/IceTargetLowering.h

index 0cf0ffc..1675cf9 100644 (file)
@@ -203,6 +203,7 @@ else()
     set_cpp_flag("-Werror=reorder")
     set_cpp_flag("-Werror=sign-compare")
     set_cpp_flag("-Werror=missing-braces")
+    set_cpp_flag("-Werror=unused-lambda-capture")
     set_cpp_flag("-fno-exceptions")
 
     # Remove xor, and, or and friends from the list of keywords, they are used
index 5cb42e6..c92a929 100644 (file)
@@ -532,6 +532,7 @@ protected:
 
       auto makeExtractThunk = [this, Index, NumElements](Operand *Src) {
         return [this, Index, NumElements, Src]() {
+          (void)NumElements;
           assert(typeNumElements(Src->getType()) == NumElements);
 
           const auto ElementTy = typeElementType(Src->getType());