diff --git a/include/slang/ast/expressions/OperatorExpressions.h b/include/slang/ast/expressions/OperatorExpressions.h index 6bb888413..73d42ba90 100644 --- a/include/slang/ast/expressions/OperatorExpressions.h +++ b/include/slang/ast/expressions/OperatorExpressions.h @@ -112,10 +112,10 @@ class SLANG_EXPORT ConditionalExpression : public Expression { Expression(ExpressionKind::ConditionalOp, type, sourceRange), conditions(conditions), left_(&left), right_(&right), isConst(isConst), isTrue(isTrue) {} - const Expression& left() const { SLANG_SUPPRESS return *left_; } + const Expression& left() const { return *left_; } // NOLINT Expression& left() { return *left_; } - const Expression& right() const { SLANG_SUPPRESS return *right_; } + const Expression& right() const { return *right_; } // NOLINT Expression& right() { return *right_; } ConstantValue evalImpl(EvalContext& context) const; diff --git a/include/slang/util/BumpAllocator.h b/include/slang/util/BumpAllocator.h index eefebfdfd..75d8ac729 100644 --- a/include/slang/util/BumpAllocator.h +++ b/include/slang/util/BumpAllocator.h @@ -7,6 +7,7 @@ //------------------------------------------------------------------------------ #pragma once +#include #include #include @@ -59,7 +60,7 @@ class SLANG_EXPORT BumpAllocator { return {}; auto dest = reinterpret_cast(allocate(len * sizeof(T), alignof(T))); - memcpy(dest, src.data(), len * sizeof(T)); + std::memcpy(dest, src.data(), len * sizeof(T)); return std::span(dest, len); } diff --git a/include/slang/util/Util.h b/include/slang/util/Util.h index 868cb4111..9bc4019f7 100644 --- a/include/slang/util/Util.h +++ b/include/slang/util/Util.h @@ -103,10 +103,8 @@ // Compiler-specific macros for warnings and suppressions #ifdef __clang__ # define SLANG_NO_SANITIZE(warningName) __attribute__((no_sanitize(warningName))) -# define SLANG_SUPPRESS [[clang::suppress]] #else # define SLANG_NO_SANITIZE(warningName) -# define SLANG_SUPPRESS #endif using namespace std::literals; diff --git a/source/ast/symbols/InstanceSymbols.cpp b/source/ast/symbols/InstanceSymbols.cpp index b90ef0eeb..fccd00d72 100644 --- a/source/ast/symbols/InstanceSymbols.cpp +++ b/source/ast/symbols/InstanceSymbols.cpp @@ -647,11 +647,11 @@ void InstanceSymbol::fromSyntax(Compilation& comp, const HierarchyInstantiationS if (specificInstance) { results.push_back(builder.create(*specificInstance)); } - else - SLANG_SUPPRESS { - for (auto instanceSyntax : syntax.instances) - results.push_back(builder.create(*instanceSyntax)); - } + else { + // NOLINTNEXTLINE + for (auto instanceSyntax : syntax.instances) + results.push_back(builder.create(*instanceSyntax)); + } }; // If we came here from a bind directive we need to make use diff --git a/source/numeric/Time.cpp b/source/numeric/Time.cpp index 15e0f48a0..95b891e4a 100644 --- a/source/numeric/Time.cpp +++ b/source/numeric/Time.cpp @@ -113,7 +113,7 @@ std::string TimeScaleValue::toString() const { std::strong_ordering TimeScaleValue::operator<=>(const TimeScaleValue& rhs) const { // Unit enum is specified in reverse order, so check in the opposite direction. - if (auto cmp = rhs.unit <=> unit; cmp != 0) + if (auto cmp = rhs.unit <=> unit; cmp != 0) // NOLINT return cmp; return magnitude <=> rhs.magnitude; } diff --git a/source/text/Glob.cpp b/source/text/Glob.cpp index 4bc94222b..bd44fcf71 100644 --- a/source/text/Glob.cpp +++ b/source/text/Glob.cpp @@ -286,6 +286,7 @@ SLANG_EXPORT GlobRank svGlob(const fs::path& basePath, std::string_view pattern, static std::string_view nextSegment(std::string_view& path) { for (size_t i = 0; i < path.size(); i++) { + // NOLINTNEXTLINE if (path[i] == fs::path::preferred_separator || path[i] == '/') { auto result = path.substr(0, i); path = path.substr(i + 1);