diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2019-06-14 19:23:55 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2019-06-27 07:40:49 +0100 |
commit | 06e5ab897561309dce7b8ecbaeb333bbe152f373 (patch) | |
tree | aea0b081ee23f96567a836a99e56e9470b167acb | |
parent | d6ef11821944d697cc946f1c5d05999285785f5d (diff) | |
download | swig-06e5ab897561309dce7b8ecbaeb333bbe152f373.tar.gz |
Workaround clang 10.0.1 C++17 linker errors in testcases
Fixes:
Undefined symbols for architecture x86_64: "___cxa_deleted_virtual"
which clang issues when a class deletes a method (seems to be when the
function is not one of the compiler's automatically added special member
functions).
-rw-r--r-- | Examples/test-suite/cpp11_default_delete.i | 6 | ||||
-rw-r--r-- | Examples/test-suite/cpp11_noexcept.i | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Examples/test-suite/cpp11_default_delete.i b/Examples/test-suite/cpp11_default_delete.i index b5e84ed51..0c20fb7ee 100644 --- a/Examples/test-suite/cpp11_default_delete.i +++ b/Examples/test-suite/cpp11_default_delete.i @@ -28,7 +28,13 @@ A1::A1(const A1&) = default; struct A2 { void funk(int i) {} + +// Workaround clang 10.0.1 -std=c++17 linker error (oddly for Java and not Python): +// Undefined symbols for architecture x86_64:"___cxa_deleted_virtual", referenced from: vtable for A2 +#if !(defined(__clang__) && __cplusplus >= 201703L) virtual void fff(int) = delete; +#endif + virtual ~A2() = default; template<class T> void funk(T) = delete; }; diff --git a/Examples/test-suite/cpp11_noexcept.i b/Examples/test-suite/cpp11_noexcept.i index a77eb046f..8aa0baa5a 100644 --- a/Examples/test-suite/cpp11_noexcept.i +++ b/Examples/test-suite/cpp11_noexcept.i @@ -31,8 +31,13 @@ struct NoExceptClass { void noo1() const noexcept {} static void noo2() noexcept {} virtual void noo3() const noexcept {} + +// Workaround clang 10.0.1 -std=c++17 linker error (oddly for Java and not Python): +// Undefined symbols for architecture x86_64: "___cxa_deleted_virtual", referenced from: vtable for NoExceptClass +#if !(defined(__clang__) && __cplusplus >= 201703L) virtual void noo4() const noexcept = delete; virtual void noo5() const throw() = delete; +#endif }; struct NoExceptAbstract { |