Enable -Wextra-semi and -Wextra-semi-stmt.

This will prevent users from accidentally making semicolon errors in
the future.

Bug: chromium:926235
Change-Id: I79a6fa376fb1ad8f0fcf1b65b1f572a035d1f4e9
Reviewed-on: https://chromium-review.googlesource.com/c/1446493
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/ImageD3D.h b/src/libANGLE/renderer/d3d/ImageD3D.h
index 04dd38b..70b1e12 100644
--- a/src/libANGLE/renderer/d3d/ImageD3D.h
+++ b/src/libANGLE/renderer/d3d/ImageD3D.h
@@ -38,7 +38,7 @@
 {
   public:
     ImageD3D();
-    virtual ~ImageD3D(){};
+    virtual ~ImageD3D() {}
 
     GLsizei getWidth() const { return mWidth; }
     GLsizei getHeight() const { return mHeight; }
diff --git a/src/libANGLE/renderer/d3d/ProgramD3D.cpp b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
index d43e560..edd6d2a 100644
--- a/src/libANGLE/renderer/d3d/ProgramD3D.cpp
+++ b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
@@ -263,7 +263,7 @@
 
     *sizeOut = sizeIter->second;
     return true;
-};
+}
 
 bool InterfaceBlockInfo::getBlockMemberInfo(const std::string &name,
                                             const std::string &mappedName,
@@ -278,7 +278,7 @@
 
     *infoOut = infoIter->second;
     return true;
-};
+}
 
 // Helper class that gathers uniform info from the default uniform block.
 class UniformEncodingVisitorD3D : public sh::BlockEncoderVisitor
diff --git a/src/libANGLE/renderer/d3d/RendererD3D.h b/src/libANGLE/renderer/d3d/RendererD3D.h
index 888c5ca..18c7b8e 100644
--- a/src/libANGLE/renderer/d3d/RendererD3D.h
+++ b/src/libANGLE/renderer/d3d/RendererD3D.h
@@ -92,7 +92,7 @@
 
 // ANGLE_TRY for HRESULT errors.
 #define ANGLE_TRY_HR(CONTEXT, EXPR, MESSAGE)                                                     \
-                                                                                                 \
+    do                                                                                           \
     {                                                                                            \
         auto ANGLE_LOCAL_VAR = (EXPR);                                                           \
         if (ANGLE_UNLIKELY(FAILED(ANGLE_LOCAL_VAR)))                                             \
@@ -100,16 +100,17 @@
             CONTEXT->handleResult(ANGLE_LOCAL_VAR, MESSAGE, __FILE__, ANGLE_FUNCTION, __LINE__); \
             return angle::Result::Stop;                                                          \
         }                                                                                        \
-    }
+    } while (0)
 
 #define ANGLE_CHECK_HR(CONTEXT, EXPR, MESSAGE, ERROR)                                  \
+    do                                                                                 \
     {                                                                                  \
         if (ANGLE_UNLIKELY(!(EXPR)))                                                   \
         {                                                                              \
             CONTEXT->handleResult(ERROR, MESSAGE, __FILE__, ANGLE_FUNCTION, __LINE__); \
             return angle::Result::Stop;                                                \
         }                                                                              \
-    }
+    } while (0)
 
 #define ANGLE_HR_UNREACHABLE(context) \
     UNREACHABLE();                    \
diff --git a/src/libANGLE/renderer/d3d/TextureD3D.h b/src/libANGLE/renderer/d3d/TextureD3D.h
index 8d2dfaf..4eb43b5 100644
--- a/src/libANGLE/renderer/d3d/TextureD3D.h
+++ b/src/libANGLE/renderer/d3d/TextureD3D.h
@@ -160,7 +160,7 @@
 
     angle::Result releaseTexStorage(const gl::Context *context);
 
-    GLuint getBaseLevel() const { return mBaseLevel; };
+    GLuint getBaseLevel() const { return mBaseLevel; }
 
     virtual void markAllImagesDirty() = 0;
 
diff --git a/src/libANGLE/renderer/d3d/VertexBuffer.h b/src/libANGLE/renderer/d3d/VertexBuffer.h
index 2376fbb..2b91b9f 100644
--- a/src/libANGLE/renderer/d3d/VertexBuffer.h
+++ b/src/libANGLE/renderer/d3d/VertexBuffer.h
@@ -62,7 +62,7 @@
     unsigned int getSerial() const;
 
     // This may be overridden (e.g. by VertexBuffer11) if necessary.
-    virtual void hintUnmapResource(){};
+    virtual void hintUnmapResource() {}
 
     // Reference counting.
     void addRef();
diff --git a/src/libANGLE/renderer/d3d/d3d11/Blit11Helper_autogen.inc b/src/libANGLE/renderer/d3d/d3d11/Blit11Helper_autogen.inc
index 5c9434c..5662700 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Blit11Helper_autogen.inc
+++ b/src/libANGLE/renderer/d3d/d3d11/Blit11Helper_autogen.inc
@@ -1,7 +1,7 @@
 // GENERATED FILE - DO NOT EDIT.
 // Generated by gen_blit11helper.py.
 //
-// Copyright 2018 The ANGLE Project Authors. All rights reserved.
+// Copyright 2019 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
@@ -914,7 +914,7 @@
             UNREACHABLE();
             return BLITSHADER_INVALID;
     }
-};
+}
 
 angle::Result Blit11::mapBlitShader(const gl::Context *context,
                                     BlitShaderType blitShaderType)
diff --git a/src/libANGLE/renderer/d3d/d3d11/Renderer11.h b/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
index dcdd4c4..9861b9b 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
@@ -317,9 +317,9 @@
     // D3D11-renderer specific methods
     ID3D11Device *getDevice() { return mDevice; }
     void *getD3DDevice() override;
-    ID3D11DeviceContext *getDeviceContext() { return mDeviceContext; };
-    ID3D11DeviceContext1 *getDeviceContext1IfSupported() { return mDeviceContext1; };
-    IDXGIFactory *getDxgiFactory() { return mDxgiFactory; };
+    ID3D11DeviceContext *getDeviceContext() { return mDeviceContext; }
+    ID3D11DeviceContext1 *getDeviceContext1IfSupported() { return mDeviceContext1; }
+    IDXGIFactory *getDxgiFactory() { return mDxgiFactory; }
 
     angle::Result getBlendState(const gl::Context *context,
                                 const d3d11::BlendStateKey &key,
@@ -388,7 +388,7 @@
                                        bool stencilBlit);
 
     bool isES3Capable() const;
-    const Renderer11DeviceCaps &getRenderer11DeviceCaps() const { return mRenderer11DeviceCaps; };
+    const Renderer11DeviceCaps &getRenderer11DeviceCaps() const { return mRenderer11DeviceCaps; }
 
     RendererClass getRendererClass() const override;
     StateManager11 *getStateManager() { return &mStateManager; }
diff --git a/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp b/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp
index 9fcd8a5..e88b906 100644
--- a/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/VertexArray11.cpp
@@ -97,9 +97,9 @@
                 break;
             }
 
-                ANGLE_VERTEX_INDEX_CASES(ANGLE_VERTEX_DIRTY_ATTRIB_FUNC);
-                ANGLE_VERTEX_INDEX_CASES(ANGLE_VERTEX_DIRTY_BINDING_FUNC);
-                ANGLE_VERTEX_INDEX_CASES(ANGLE_VERTEX_DIRTY_BUFFER_DATA_FUNC);
+                ANGLE_VERTEX_INDEX_CASES(ANGLE_VERTEX_DIRTY_ATTRIB_FUNC)
+                ANGLE_VERTEX_INDEX_CASES(ANGLE_VERTEX_DIRTY_BINDING_FUNC)
+                ANGLE_VERTEX_INDEX_CASES(ANGLE_VERTEX_DIRTY_BUFFER_DATA_FUNC)
 
             default:
                 UNREACHABLE();
diff --git a/src/libANGLE/renderer/d3d/d3d11/d3d11_blit_shaders_autogen.gni b/src/libANGLE/renderer/d3d/d3d11/d3d11_blit_shaders_autogen.gni
index 185810e..988ae52 100644
--- a/src/libANGLE/renderer/d3d/d3d11/d3d11_blit_shaders_autogen.gni
+++ b/src/libANGLE/renderer/d3d/d3d11/d3d11_blit_shaders_autogen.gni
@@ -1,7 +1,7 @@
 # GENERATED FILE - DO NOT EDIT.
 # Generated by gen_blit11helper.py.
 #
-# Copyright 2018 The ANGLE Project Authors. All rights reserved.
+# Copyright 2019 The ANGLE Project Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 #
diff --git a/src/libANGLE/renderer/d3d/d3d11/gen_blit11helper.py b/src/libANGLE/renderer/d3d/d3d11/gen_blit11helper.py
index 3b04689..d262b43 100644
--- a/src/libANGLE/renderer/d3d/d3d11/gen_blit11helper.py
+++ b/src/libANGLE/renderer/d3d/d3d11/gen_blit11helper.py
@@ -45,7 +45,7 @@
             UNREACHABLE();
             return BLITSHADER_INVALID;
     }}
-}};
+}}
 
 angle::Result Blit11::mapBlitShader(const gl::Context *context,
                                     BlitShaderType blitShaderType)