mirror of
https://github.com/IRBorisov/ConceptCore.git
synced 2025-06-25 16:50:36 +03:00
Fix warnings and build issues
This commit is contained in:
parent
0c6d998cc5
commit
cc5a605a88
|
@ -7,7 +7,7 @@ LABEL description="Linux build environment"
|
|||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install standard packages
|
||||
RUN dnf update && \
|
||||
RUN dnf update -y && \
|
||||
dnf upgrade -y && \
|
||||
dnf install -y \
|
||||
nano \
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
template<typename Up,
|
||||
typename std::enable_if_t<std::is_constructible_v<T, Up&&>>>
|
||||
PropagateConst(PropagateConst<Up>&& up) // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
|
||||
: pointer{ std::move(up.pointer) } {}
|
||||
: pointer{ std::move(up).pointer } {}
|
||||
|
||||
template<typename Up,
|
||||
typename std::enable_if_t<std::is_constructible_v<T, Up&&>>>
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
template<typename Up,
|
||||
typename std::enable_if_t<std::is_constructible_v<T, Up&&>>>
|
||||
constexpr PropagateConst& operator=(PropagateConst<Up>&& up) {
|
||||
pointer = std::move(up.pointer);
|
||||
pointer = std::move(up).pointer;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,11 @@ struct StaticMap {
|
|||
|
||||
[[nodiscard]] constexpr bool ContainsKey(const Key& key) const noexcept {
|
||||
const auto itr =
|
||||
std::find_if(begin(data), end(data),
|
||||
[&key](const auto& v) { return v.first == key; });
|
||||
std::find_if(
|
||||
begin(data),
|
||||
end(data),
|
||||
[&key](const auto& v) { return v.first == key; }
|
||||
);
|
||||
if (itr != end(data)) {
|
||||
return true;
|
||||
} else {
|
||||
|
@ -37,8 +40,11 @@ struct StaticMap {
|
|||
|
||||
[[nodiscard]] constexpr bool ContainsValue(const Value& value) const noexcept {
|
||||
const auto itr =
|
||||
std::find_if(begin(data), end(data),
|
||||
[&value](const auto& v) { return v.second == value; });
|
||||
std::find_if(
|
||||
begin(data),
|
||||
end(data),
|
||||
[&value](const auto& v) { return v.second == value; }
|
||||
);
|
||||
if (itr != end(data)) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
@ -625,8 +625,9 @@ bool ASTInterpreter::EvaluateFilterComplex(
|
|||
auto result = Factory::EmptySet();
|
||||
for (const auto& element : argument.B()) {
|
||||
std::vector<StructuredData> components{};
|
||||
for (auto i = 0U; i < size(indicies); ++i) {
|
||||
components.emplace_back(element.T().Component(indicies[i]));
|
||||
components.reserve(size(indicies));
|
||||
for (const auto& index : indicies) {
|
||||
components.emplace_back(element.T().Component(index));
|
||||
}
|
||||
const auto tuple = Factory::Tuple(components);
|
||||
if (paramValue.B().Contains(tuple)) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wuseless-cast"
|
||||
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
|
||||
#endif
|
||||
|
||||
#include "AsciiLexerImpl.hpp"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wuseless-cast"
|
||||
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
|
||||
#endif
|
||||
|
||||
#include "MathLexerImpl.hpp"
|
||||
|
|
|
@ -191,7 +191,7 @@ RawNode TupleDeclaration(ParserState* state, RawNode tuple) {
|
|||
// TODO: check tuple contains only local variables, ParseEID::expectedLocal
|
||||
std::vector<Node*> stack{ tuple.get()};
|
||||
while (!stack.empty()) {
|
||||
auto node = stack.back();
|
||||
auto* node = stack.back();
|
||||
const auto id = node->token.id;
|
||||
stack.pop_back();
|
||||
if (id == TokenID::NT_TUPLE) {
|
||||
|
@ -257,9 +257,9 @@ bool SemanticCheck(ParserState* state, RawNode root) {
|
|||
std::vector<Node*> stack{ root.get() };
|
||||
std::vector<Node*> parents{ nullptr };
|
||||
while (!stack.empty()) {
|
||||
const auto node = stack.back();
|
||||
auto *const node = stack.back();
|
||||
stack.pop_back();
|
||||
const auto parent = parents.back();
|
||||
auto *const parent = parents.back();
|
||||
parents.pop_back();
|
||||
|
||||
const auto id = node->token.id;
|
||||
|
|
|
@ -986,7 +986,7 @@ bool TypeAuditor::ViFilter(Cursor iter) {
|
|||
);
|
||||
return false;
|
||||
}
|
||||
++child;
|
||||
++child; // NOLINT(clang-diagnostic-for-loop-analysis)
|
||||
}
|
||||
} else {
|
||||
const auto param = ChildType(iter, 0);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wuseless-cast"
|
||||
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
|
||||
#endif
|
||||
|
||||
#include "../lib/convert.cpp"
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#pragma GCC diagnostic ignored "-Wuseless-cast"
|
||||
#pragma GCC diagnostic ignored "-Wunused-label"
|
||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
|
||||
#endif
|
||||
|
||||
#include "../lib/debug.cpp"
|
||||
|
|
Loading…
Reference in New Issue
Block a user