mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 04:24:37 +03:00
Suppress -Wbitwise-instead-of-logical warning that was introduced by clang 14
This commit is contained in:
4
.github/workflows/build-config.json
vendored
4
.github/workflows/build-config.json
vendored
@@ -16,11 +16,11 @@
|
|||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": ["asmjit_test_assembler", "--quiet"],
|
"cmd": ["asmjit_test_assembler"],
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmd": ["asmjit_test_assembler", "--quiet", "--validate"],
|
"cmd": ["asmjit_test_assembler", "--validate"],
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- { title: "linux-lib" , os: "ubuntu-latest" , cc: "clang" , arch: "x64", build_type: "Release", problem_matcher: "cpp" }
|
- { title: "linux-lib" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x64", build_type: "Release", problem_matcher: "cpp" }
|
||||||
- { title: "windows-lib" , os: "windows-2022" , cc: "vs2022" , arch: "x86", build_type: "Debug" , problem_matcher: "cpp" }
|
- { title: "windows-lib" , os: "windows-2022" , cc: "vs2022" , arch: "x86", build_type: "Debug" , problem_matcher: "cpp" }
|
||||||
|
|
||||||
- { title: "diag-asan" , os: "ubuntu-latest" , cc: "clang" , arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON", diagnostics: "address" }
|
- { title: "diag-asan" , os: "ubuntu-latest" , cc: "clang" , arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON", diagnostics: "address" }
|
||||||
@@ -91,6 +91,14 @@ jobs:
|
|||||||
- { title: "linux" , os: "ubuntu-20.04" , cc: "clang-12", arch: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
|
- { title: "linux" , os: "ubuntu-20.04" , cc: "clang-12", arch: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
|
||||||
- { title: "linux" , os: "ubuntu-20.04" , cc: "clang-12", arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
|
- { title: "linux" , os: "ubuntu-20.04" , cc: "clang-12", arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
|
||||||
- { title: "linux" , os: "ubuntu-20.04" , cc: "clang-12", arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
|
- { title: "linux" , os: "ubuntu-20.04" , cc: "clang-12", arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
|
||||||
|
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-13", arch: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
|
||||||
|
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-13", arch: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
|
||||||
|
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-13", arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
|
||||||
|
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-13", arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
|
||||||
|
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x86", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
|
||||||
|
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x86", build_type: "Release", defs: "ASMJIT_TEST=ON" }
|
||||||
|
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
|
||||||
|
- { title: "linux" , os: "ubuntu-22.04" , cc: "clang-14", arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
|
||||||
|
|
||||||
- { title: "macos-10.15" , os: "macos-10.15" , cc: "gcc-9" , arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
|
- { title: "macos-10.15" , os: "macos-10.15" , cc: "gcc-9" , arch: "x64", build_type: "Debug" , defs: "ASMJIT_TEST=ON" }
|
||||||
- { title: "macos-10.15" , os: "macos-10.15" , cc: "gcc-9" , arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
|
- { title: "macos-10.15" , os: "macos-10.15" , cc: "gcc-9" , arch: "x64", build_type: "Release", defs: "ASMJIT_TEST=ON" }
|
||||||
|
|||||||
@@ -481,6 +481,16 @@ namespace asmjit {
|
|||||||
#if defined _DOXYGEN
|
#if defined _DOXYGEN
|
||||||
#define ASMJIT_BEGIN_NAMESPACE namespace asmjit {
|
#define ASMJIT_BEGIN_NAMESPACE namespace asmjit {
|
||||||
#define ASMJIT_END_NAMESPACE }
|
#define ASMJIT_END_NAMESPACE }
|
||||||
|
#elif defined(__clang_major__) && __clang_major__ >= 14
|
||||||
|
#define ASMJIT_BEGIN_NAMESPACE \
|
||||||
|
namespace asmjit { inline namespace ASMJIT_ABI_NAMESPACE { \
|
||||||
|
_Pragma("clang diagnostic push") \
|
||||||
|
_Pragma("clang diagnostic ignored \"-Wbitwise-instead-of-logical\"") \
|
||||||
|
_Pragma("clang diagnostic ignored \"-Wconstant-logical-operand\"") \
|
||||||
|
_Pragma("clang diagnostic ignored \"-Wunnamed-type-template-args\"")
|
||||||
|
#define ASMJIT_END_NAMESPACE \
|
||||||
|
_Pragma("clang diagnostic pop") \
|
||||||
|
}}
|
||||||
#elif defined(__clang__)
|
#elif defined(__clang__)
|
||||||
#define ASMJIT_BEGIN_NAMESPACE \
|
#define ASMJIT_BEGIN_NAMESPACE \
|
||||||
namespace asmjit { inline namespace ASMJIT_ABI_NAMESPACE { \
|
namespace asmjit { inline namespace ASMJIT_ABI_NAMESPACE { \
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ int main(int argc, char* argv[]) {
|
|||||||
CmdLine cmdLine(argc, argv);
|
CmdLine cmdLine(argc, argv);
|
||||||
|
|
||||||
TestSettings settings {};
|
TestSettings settings {};
|
||||||
settings.quiet = cmdLine.hasArg("--quiet");
|
settings.verbose = cmdLine.hasArg("--verbose");
|
||||||
settings.validate = cmdLine.hasArg("--validate");
|
settings.validate = cmdLine.hasArg("--validate");
|
||||||
|
|
||||||
printf("AsmJit Assembler Test-Suite v%u.%u.%u:\n\n",
|
printf("AsmJit Assembler Test-Suite v%u.%u.%u:\n\n",
|
||||||
@@ -37,7 +37,7 @@ int main(int argc, char* argv[]) {
|
|||||||
printf("Usage:\n");
|
printf("Usage:\n");
|
||||||
printf(" --help Show usage only\n");
|
printf(" --help Show usage only\n");
|
||||||
printf(" --arch=<ARCH> Select architecture to run ('all' by default)\n");
|
printf(" --arch=<ARCH> Select architecture to run ('all' by default)\n");
|
||||||
printf(" --quiet Show only assembling errors [%s]\n", settings.quiet ? "x" : " ");
|
printf(" --verbose Log all instruction tests [%s]\n", settings.verbose ? "x" : " ");
|
||||||
printf(" --validate Use instruction validation [%s]\n", settings.validate ? "x" : " ");
|
printf(" --validate Use instruction validation [%s]\n", settings.validate ? "x" : " ");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
struct TestSettings {
|
struct TestSettings {
|
||||||
bool quiet;
|
bool verbose;
|
||||||
bool validate;
|
bool validate;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!settings.quiet)
|
if (settings.verbose)
|
||||||
printf(" OK [%s] <- %s\n", encodedOpcode.data(), s);
|
printf(" OK [%s] <- %s\n", encodedOpcode.data(), s);
|
||||||
|
|
||||||
passed++;
|
passed++;
|
||||||
|
|||||||
Reference in New Issue
Block a user