mirror of https://github.com/swig/swig
Suppress clang warnings in test-suite
Suppresses -Wfinal-dtor-non-final-class and -Wnon-c-typedef-for-linkage observed with clang 17.
This commit is contained in:
parent
a24465c3cb
commit
0d203fc1df
|
@ -9,6 +9,13 @@
|
|||
%warnfilter(SWIGWARN_LANG_DIRECTOR_FINAL) BaseFinalDestructor::~BaseFinalDestructor;
|
||||
%warnfilter(SWIGWARN_LANG_DIRECTOR_FINAL) BaseFinalDestructor2::~BaseFinalDestructor2;
|
||||
|
||||
%{
|
||||
#if defined(__clang__)
|
||||
// Suppress: class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class]
|
||||
#pragma clang diagnostic ignored "-Wfinal-dtor-non-final-class"
|
||||
#endif
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
struct Base {
|
||||
virtual void basemeth() final {}
|
||||
|
|
|
@ -6,6 +6,13 @@
|
|||
%warnfilter(SWIGWARN_PARSE_KEYWORD) final; // 'final' is a java keyword, renaming to '_final'
|
||||
%warnfilter(SWIGWARN_PARSE_KEYWORD) override; // 'override' is a C# keyword, renaming to '_override'
|
||||
|
||||
%{
|
||||
#if defined(__clang__)
|
||||
// Suppress: class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class]
|
||||
#pragma clang diagnostic ignored "-Wfinal-dtor-non-final-class"
|
||||
#endif
|
||||
%}
|
||||
|
||||
// throw is invalid in C++17 and later, only SWIG to use it
|
||||
#define TESTCASE_THROW1(T1) throw(T1)
|
||||
%{
|
||||
|
|
|
@ -55,6 +55,11 @@
|
|||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
// Suppress: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
|
||||
#pragma clang diagnostic ignored "-Wnon-c-typedef-for-linkage"
|
||||
#endif
|
||||
|
||||
namespace bar {
|
||||
int foo() { return 0; }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue