From 57211f7ed7b44be324a6c73cb58c75c65600638c Mon Sep 17 00:00:00 2001 From: Peter Thoman Date: Wed, 13 Dec 2023 15:17:16 +0100 Subject: [PATCH] Update clang format, fix two warnings --- .clang-format | 4 +++- include/simsycl/sycl/device.hh | 4 +++- include/simsycl/sycl/platform.hh | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.clang-format b/.clang-format index b81163a..91277ed 100644 --- a/.clang-format +++ b/.clang-format @@ -1,7 +1,7 @@ # Clang-format coding style definitions for simSYCL # # Due to some inconsistencies between releases we currently -# use clang-format 14 as the authoritative version. +# use clang-format 16 as the authoritative version. BasedOnStyle: llvm @@ -20,6 +20,7 @@ BreakBeforeBinaryOperators: All BreakBeforeBraces: Attach ColumnLimit: 120 Cpp11BracedListStyle: true +FixNamespaceComments: true IndentCaseLabels: true IndentWidth: 4 KeepEmptyLinesAtTheStartOfBlocks: false @@ -28,6 +29,7 @@ NamespaceIndentation: None PointerAlignment: Right QualifierAlignment: Left SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword : false SpaceBeforeParens: Never SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 diff --git a/include/simsycl/sycl/device.hh b/include/simsycl/sycl/device.hh index a56682a..4638ba9 100644 --- a/include/simsycl/sycl/device.hh +++ b/include/simsycl/sycl/device.hh @@ -52,7 +52,9 @@ class device : public detail::reference_type { device() : device(default_selector_v) {} template - explicit device(const DeviceSelector &device_selector) : reference_type(std::in_place) {} + explicit device(const DeviceSelector &device_selector) : reference_type(std::in_place) { + (void)(device_selector); + } bool is_cpu() const; diff --git a/include/simsycl/sycl/platform.hh b/include/simsycl/sycl/platform.hh index faf078d..e9340f9 100644 --- a/include/simsycl/sycl/platform.hh +++ b/include/simsycl/sycl/platform.hh @@ -27,7 +27,9 @@ class platform : public detail::reference_type platform() : platform(default_selector_v) {} template - explicit platform(const DeviceSelector &device_selector) : reference_type(std::in_place) {} + explicit platform(const DeviceSelector &device_selector) : reference_type(std::in_place) { + (void)(device_selector); + } backend get_backend() const noexcept;