Commit 2a582380 by Ben Clayton

CMakeLists: Treat trailing semicolons as warnings / errors

Fix all code that had trailing semicolons. Some downstream projects also consider these as errors, so this change catches the breakages at the source. Bug: b/130343040 Bug: b/130335507 Change-Id: I19ef3b5c682524542cde68f917ca9310a19da286 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29810Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 4ceb77de
......@@ -241,6 +241,7 @@ else()
list(APPEND SWIFTSHADER_COMPILE_OPTIONS
"-Werror=unused-lambda-capture"
"-Werror=string-conversion"
"-Werror=extra-semi"
)
endif()
......
......@@ -25,7 +25,7 @@ namespace sw
{
public:
Rasterizer() : primitive(Arg<0>()), count(Arg<1>()), cluster(Arg<2>()), data(Arg<3>()) {}
virtual ~Rasterizer() {};
virtual ~Rasterizer() {}
protected:
Pointer<Byte> primitive;
......
......@@ -44,7 +44,7 @@ public:
protected:
Context(egl::Display *display) : display(display) {}
virtual ~Context() {};
virtual ~Context() {}
egl::Display *const display;
};
......
......@@ -37,7 +37,7 @@ class RenderbufferInterface
public:
RenderbufferInterface();
virtual ~RenderbufferInterface() {};
virtual ~RenderbufferInterface() {}
virtual void addProxyRef(const Renderbuffer *proxy);
virtual void releaseProxy(const Renderbuffer *proxy);
......
......@@ -41,7 +41,7 @@ class RenderbufferInterface
public:
RenderbufferInterface();
virtual ~RenderbufferInterface() {};
virtual ~RenderbufferInterface() {}
virtual void addProxyRef(const Renderbuffer *proxy);
virtual void releaseProxy(const Renderbuffer *proxy);
......
......@@ -31,7 +31,7 @@ namespace sw
{
public:
VertexRoutinePrototype() : vertex(Arg<0>()), batch(Arg<1>()), task(Arg<2>()), data(Arg<3>()) {}
virtual ~VertexRoutinePrototype() {};
virtual ~VertexRoutinePrototype() {}
protected:
Pointer<Byte> vertex;
......
......@@ -430,8 +430,8 @@ namespace rr
template<typename T>
struct ExecutableAllocator
{
ExecutableAllocator() {};
template<class U> ExecutableAllocator(const ExecutableAllocator<U> &other) {};
ExecutableAllocator() {}
template<class U> ExecutableAllocator(const ExecutableAllocator<U> &other) {}
using value_type = T;
using size_type = std::size_t;
......
......@@ -1230,7 +1230,7 @@ namespace sw
: Surface(width, height, depth, format, pixels, pitch, slice) {}
SurfaceImplementation(Resource *texture, int width, int height, int depth, int border, int samples, Format format, bool lockable, bool renderTarget, int pitchP = 0)
: Surface(texture, width, height, depth, border, samples, format, lockable, renderTarget, pitchP) {}
~SurfaceImplementation() override {};
~SurfaceImplementation() override {}
void *lockInternal(int x, int y, int z, Lock lock, Accessor client) override
{
......
......@@ -17,42 +17,42 @@
// TODO: Generate this list.
// VK_INSTANCE(<function name>, <return type>, <arguments>...)
VK_INSTANCE(vkAllocateCommandBuffers, VkResult, VkDevice, const VkCommandBufferAllocateInfo*, VkCommandBuffer*);
VK_INSTANCE(vkAllocateDescriptorSets, VkResult, VkDevice, const VkDescriptorSetAllocateInfo*, VkDescriptorSet*);
VK_INSTANCE(vkAllocateCommandBuffers, VkResult, VkDevice, const VkCommandBufferAllocateInfo*, VkCommandBuffer*)
VK_INSTANCE(vkAllocateDescriptorSets, VkResult, VkDevice, const VkDescriptorSetAllocateInfo*, VkDescriptorSet*)
VK_INSTANCE(vkAllocateMemory, VkResult, VkDevice, const VkMemoryAllocateInfo*, const VkAllocationCallbacks*,
VkDeviceMemory*);
VK_INSTANCE(vkBeginCommandBuffer, VkResult, VkCommandBuffer, const VkCommandBufferBeginInfo*);
VK_INSTANCE(vkBindBufferMemory, VkResult, VkDevice, VkBuffer, VkDeviceMemory, VkDeviceSize);
VkDeviceMemory*)
VK_INSTANCE(vkBeginCommandBuffer, VkResult, VkCommandBuffer, const VkCommandBufferBeginInfo*)
VK_INSTANCE(vkBindBufferMemory, VkResult, VkDevice, VkBuffer, VkDeviceMemory, VkDeviceSize)
VK_INSTANCE(vkCmdBindDescriptorSets, void, VkCommandBuffer, VkPipelineBindPoint, VkPipelineLayout, uint32_t, uint32_t,
const VkDescriptorSet*, uint32_t, const uint32_t*);
VK_INSTANCE(vkCmdBindPipeline, void, VkCommandBuffer, VkPipelineBindPoint, VkPipeline);
VK_INSTANCE(vkCmdDispatch, void, VkCommandBuffer, uint32_t, uint32_t, uint32_t);
VK_INSTANCE(vkCreateBuffer, VkResult, VkDevice, const VkBufferCreateInfo*, const VkAllocationCallbacks*, VkBuffer*);
const VkDescriptorSet*, uint32_t, const uint32_t*)
VK_INSTANCE(vkCmdBindPipeline, void, VkCommandBuffer, VkPipelineBindPoint, VkPipeline)
VK_INSTANCE(vkCmdDispatch, void, VkCommandBuffer, uint32_t, uint32_t, uint32_t)
VK_INSTANCE(vkCreateBuffer, VkResult, VkDevice, const VkBufferCreateInfo*, const VkAllocationCallbacks*, VkBuffer*)
VK_INSTANCE(vkCreateCommandPool, VkResult, VkDevice, const VkCommandPoolCreateInfo*, const VkAllocationCallbacks*,
VkCommandPool*);
VkCommandPool*)
VK_INSTANCE(vkCreateComputePipelines, VkResult, VkDevice, VkPipelineCache, uint32_t, const VkComputePipelineCreateInfo*,
const VkAllocationCallbacks*, VkPipeline*);
const VkAllocationCallbacks*, VkPipeline*)
VK_INSTANCE(vkCreateDescriptorPool, VkResult, VkDevice, const VkDescriptorPoolCreateInfo*, const VkAllocationCallbacks*,
VkDescriptorPool*);
VkDescriptorPool*)
VK_INSTANCE(vkCreateDescriptorSetLayout, VkResult, VkDevice, const VkDescriptorSetLayoutCreateInfo*,
const VkAllocationCallbacks*, VkDescriptorSetLayout*);
const VkAllocationCallbacks*, VkDescriptorSetLayout*)
VK_INSTANCE(vkCreateDevice, VkResult, VkPhysicalDevice, const VkDeviceCreateInfo*, const VkAllocationCallbacks*,
VkDevice*);
VkDevice*)
VK_INSTANCE(vkCreatePipelineLayout, VkResult, VkDevice, const VkPipelineLayoutCreateInfo*, const VkAllocationCallbacks*,
VkPipelineLayout*);
VkPipelineLayout*)
VK_INSTANCE(vkCreateShaderModule, VkResult, VkDevice, const VkShaderModuleCreateInfo*, const VkAllocationCallbacks*,
VkShaderModule*);
VkShaderModule*)
VK_INSTANCE(vkDestroyDevice, VkResult, VkDevice, const VkAllocationCallbacks*)
VK_INSTANCE(vkEndCommandBuffer, VkResult, VkCommandBuffer);
VK_INSTANCE(vkEndCommandBuffer, VkResult, VkCommandBuffer)
VK_INSTANCE(vkEnumeratePhysicalDevices, VkResult, VkInstance, uint32_t*, VkPhysicalDevice*)
VK_INSTANCE(vkGetDeviceQueue, void, VkDevice, uint32_t, uint32_t, VkQueue*);
VK_INSTANCE(vkGetPhysicalDeviceMemoryProperties, void, VkPhysicalDevice, VkPhysicalDeviceMemoryProperties*);
VK_INSTANCE(vkGetDeviceQueue, void, VkDevice, uint32_t, uint32_t, VkQueue*)
VK_INSTANCE(vkGetPhysicalDeviceMemoryProperties, void, VkPhysicalDevice, VkPhysicalDeviceMemoryProperties*)
VK_INSTANCE(vkGetPhysicalDeviceProperties, void, VkPhysicalDevice, VkPhysicalDeviceProperties*)
VK_INSTANCE(vkGetPhysicalDeviceQueueFamilyProperties, void, VkPhysicalDevice, uint32_t*, VkQueueFamilyProperties*);
VK_INSTANCE(vkMapMemory, VkResult, VkDevice, VkDeviceMemory, VkDeviceSize, VkDeviceSize, VkMemoryMapFlags, void**);
VK_INSTANCE(vkQueueSubmit, VkResult, VkQueue, uint32_t, const VkSubmitInfo*, VkFence);
VK_INSTANCE(vkQueueWaitIdle, VkResult, VkQueue);
VK_INSTANCE(vkUnmapMemory, void, VkDevice, VkDeviceMemory);
VK_INSTANCE(vkGetPhysicalDeviceQueueFamilyProperties, void, VkPhysicalDevice, uint32_t*, VkQueueFamilyProperties*)
VK_INSTANCE(vkMapMemory, VkResult, VkDevice, VkDeviceMemory, VkDeviceSize, VkDeviceSize, VkMemoryMapFlags, void**)
VK_INSTANCE(vkQueueSubmit, VkResult, VkQueue, uint32_t, const VkSubmitInfo*, VkFence)
VK_INSTANCE(vkQueueWaitIdle, VkResult, VkQueue)
VK_INSTANCE(vkUnmapMemory, void, VkDevice, VkDeviceMemory)
VK_INSTANCE(vkUpdateDescriptorSets, void, VkDevice, uint32_t, const VkWriteDescriptorSet*, uint32_t,
const VkCopyDescriptorSet*);
VK_INSTANCE(vkDeviceWaitIdle, VkResult, VkDevice);
\ No newline at end of file
const VkCopyDescriptorSet*)
VK_INSTANCE(vkDeviceWaitIdle, VkResult, VkDevice)
\ No newline at end of file
......@@ -57,7 +57,7 @@ struct thread {
thread(const thread &) = delete;
void join() {}
static unsigned hardware_concurrency() { return 1; };
static unsigned hardware_concurrency() { return 1; }
};
}
......
......@@ -139,7 +139,7 @@ public:
using manager_type = Cfg;
static constexpr bool cache_allocator = false;
static void init() { ICE_TLS_INIT_FIELD(CfgAllocator); };
static void init() { ICE_TLS_INIT_FIELD(CfgAllocator); }
static allocator_type current();
static void set_current(const manager_type *Manager);
......@@ -166,7 +166,7 @@ public:
using manager_type = Liveness;
static constexpr bool cache_allocator = true;
static void init() { ICE_TLS_INIT_FIELD(LivenessAllocator); };
static void init() { ICE_TLS_INIT_FIELD(LivenessAllocator); }
static allocator_type current();
static void set_current(const manager_type *Manager);
......
......@@ -1237,7 +1237,7 @@ public:
private:
ENABLE_MAKE_UNIQUE;
explicit TargetDataX86(GlobalContext *Ctx) : TargetDataLowering(Ctx){};
explicit TargetDataX86(GlobalContext *Ctx) : TargetDataLowering(Ctx){}
template <typename T> static void emitConstantPool(GlobalContext *Ctx);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment