Skip to content

Commit ac3469b

Browse files
authored
[CPU] Remove redundant NOLINT comments (#29300)
### Details: - allow using "override" and "final" keywords at the same time in clang-tidy checks - remove NOLINTs that can be avoided ### Tickets: - N/A
1 parent 560b02d commit ac3469b

File tree

6 files changed

+26
-25
lines changed

6 files changed

+26
-25
lines changed

src/plugins/intel_cpu/src/.clang-tidy

+2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ CheckOptions:
9191
value: google
9292
- key: modernize-use-auto.MinTypeNameLength
9393
value: "3"
94+
- key: modernize-use-override.AllowOverrideAndFinal
95+
value: true
9496
### To be considered to enable:
9597
# # Unifies the usage of the statements
9698
# - key: readability-braces-around-statements.ShortStatementLines

src/plugins/intel_cpu/src/emitters/snippets/cpu_kernel_executor_table.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class CPUKernelExecutor : public snippets::KernelExecutor<Conf, KernelType> {
1616
: snippets::KernelExecutor<Conf, KernelType>(std::move(c)),
1717
m_kernel_cache(std::move(kernel_cache)) {}
1818

19-
void update_kernel(const Conf& config, std::shared_ptr<KernelType>& kernel) const override final { // NOLINT
19+
void update_kernel(const Conf& config, std::shared_ptr<KernelType>& kernel) const override final {
2020
const auto& cache = m_kernel_cache.lock();
2121
OPENVINO_ASSERT(cache, "Invalid kernel cache pointer in CPUKernelExecutor::update_kernel()");
2222
const auto& lookup_result = cache->getOrCreate(Key(config), [this](const Key& k) {

src/plugins/intel_cpu/src/memory_state.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ class VariableStateBase : public IVariableState {
3030
VariableStateBase(const std::string& name, MemoryDescPtr external_desc);
3131

3232
// ov::IVariableState
33-
void set_state(const ov::SoPtr<ov::ITensor>& state) override final; // NOLINT
33+
void set_state(const ov::SoPtr<ov::ITensor>& state) override final;
3434
ov::SoPtr<ov::ITensor> get_state() const override;
35-
void reset() override final; // NOLINT
36-
bool is_reset_state() const override final; // NOLINT
37-
void commit() override final; // NOLINT
35+
void reset() override final;
36+
bool is_reset_state() const override final;
37+
void commit() override final;
3838

3939
protected:
4040
virtual MemoryPtr internal_state_mem() const = 0;

src/plugins/intel_cpu/src/nodes/input.cpp

+8-9
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ struct jit_has_subnormals : public jit_has_special_value_base {
182182
const Vmm rmm6 = Vmm(6);
183183
const int length = isa == sse41 ? 4 : 8;
184184

185-
void generate() override final { // NOLINT
185+
void generate() override final {
186186
size_t const vlen = length;
187187
const int sh_bits = std::ilogb(vlen);
188188

@@ -256,7 +256,7 @@ struct jit_has_bf16_overflows : public jit_has_special_value_base {
256256
const Vmm rmm6 = Vmm(6);
257257
const int length = isa == sse41 ? 4 : 8;
258258

259-
void generate() override final { // NOLINT
259+
void generate() override final {
260260
size_t const vlen = length;
261261
const int sh_bits = std::ilogb(vlen);
262262

@@ -596,21 +596,20 @@ Input::Input(const MemoryDescPtr& memDesc,
596596
const std::string& type,
597597
const GraphContext::CPtr& context)
598598
: Input(memDesc->getShape(), memDesc->getPrecision(), name, type, context) {
599-
extMemDesc = memDesc; // NOLINT(cppcoreguidelines-prefer-member-initializer) fixed in clang-tidy-18
599+
extMemDesc = memDesc;
600600
}
601601

602602
Input::Input(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr& context, const InputConfig& config)
603603
: Input(op, context) {
604-
extMemDesc = config.desc; // NOLINT(cppcoreguidelines-prefer-member-initializer) fixed in clang-tidy-18
605-
m_isInPlace = config.inPlace; // NOLINT(cppcoreguidelines-prefer-member-initializer) fixed in clang-tidy-18
604+
extMemDesc = config.desc;
605+
m_isInPlace = config.inPlace;
606606
}
607607

608608
Input::Input(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr& context, const OutputConfig& config)
609609
: Input(op, context) {
610-
extMemDesc = config.desc; // NOLINT(cppcoreguidelines-prefer-member-initializer) fixed in clang-tidy-18
611-
m_useParentMemoryDescForOutput = // NOLINT(cppcoreguidelines-prefer-member-initializer)
612-
config.useParentMemoryDescForOutput;
613-
m_isInPlace = config.inPlace; // NOLINT(cppcoreguidelines-prefer-member-initializer) fixed in clang-tidy-18
610+
extMemDesc = config.desc;
611+
m_useParentMemoryDescForOutput = config.useParentMemoryDescForOutput;
612+
m_isInPlace = config.inPlace;
614613
}
615614

616615
MemoryCPtr Input::getMemoryPtr() const {

src/plugins/intel_cpu/src/nodes/memory.hpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ class MemoryOutputBase : public Node, public MemoryNode {
6262
return getType() == Type::MemoryOutput;
6363
}
6464

65-
void execute(const dnnl::stream& strm) override final; // NOLINT
66-
void executeDynamicImpl(const dnnl::stream& strm) override final; // NOLINT
65+
void execute(const dnnl::stream& strm) override final;
66+
void executeDynamicImpl(const dnnl::stream& strm) override final;
6767

68-
bool isExecutable() const override final; // NOLINT
69-
bool neverExecute() const override final; // NOLINT
68+
bool isExecutable() const override final;
69+
bool neverExecute() const override final;
7070

7171
void registerInputNode(MemoryInputBase* node);
7272
void deregisterSibling(MemoryInputBase* node);
@@ -141,22 +141,22 @@ class MemoryInputBase : public Input, public MemoryStateNode {
141141

142142
void initSupportedPrimitiveDescriptors() override;
143143

144-
void execute(const dnnl::stream& strm) override final; // NOLINT
145-
void executeDynamicImpl(const dnnl::stream& strm) override final; // NOLINT
144+
void execute(const dnnl::stream& strm) override final;
145+
void executeDynamicImpl(const dnnl::stream& strm) override final;
146146
bool needShapeInfer() const override {
147147
return false;
148148
}
149149
bool needPrepareParams() const override {
150150
return false;
151151
}
152-
bool neverExecute() const override final; // NOLINT
153-
bool isExecutable() const override final; // NOLINT
152+
bool neverExecute() const override final;
153+
bool isExecutable() const override final;
154154

155155
void registerOutputNode(MemoryOutputBase* node);
156156
void deregisterSibling(MemoryOutputBase* node);
157157

158158
MemoryOutputBase& getOutputNode();
159-
void assignState(MemStatePtr newState) override final; // NOLINT
159+
void assignState(MemStatePtr newState) override final;
160160

161161
protected:
162162
MemoryInputBase(const std::string& id,

src/plugins/intel_cpu/src/shape_inference/shape_inference_cpu.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ class IShapeInfer {
6565
*/
6666
class ShapeInferEmptyPads : public IShapeInfer {
6767
public:
68-
const ov::CoordinateDiff& get_pads_begin() override final { // NOLINT
68+
const ov::CoordinateDiff& get_pads_begin() override final {
6969
return m_emptyVec;
7070
}
71-
const ov::CoordinateDiff& get_pads_end() override final { // NOLINT
71+
const ov::CoordinateDiff& get_pads_end() override final {
7272
return m_emptyVec;
7373
}
7474

0 commit comments

Comments
 (0)