[OCaml] Add missing warning filters for OCaml keywords in the test suite

This commit is contained in:
Zackery Spytz 2018-12-31 05:55:10 -07:00
parent 0078c7d84d
commit 5c19f4de2f
32 changed files with 129 additions and 0 deletions

View File

@ -2,6 +2,10 @@
// %constant and struct
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%inline %{
#if defined(_MSC_VER)
#pragma warning(disable : 4190) // warning C4190: 'result' has C-linkage specified, but returns UDT 'Type1' which is incompatible with C

View File

@ -2,6 +2,10 @@
%module cpp_namespace
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%inline %{
typedef int Bad;

View File

@ -1,5 +1,9 @@
%module default_arg_expressions
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) ptr;
%warnfilter(SWIGWARN_TYPEMAP_SWIGTYPELEAK_MSG) UsdGeomTokensPtr;
%immutable UsdGeomTokens;

View File

@ -2,6 +2,10 @@
%module default_args
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%{
#if defined(_MSC_VER)
#pragma warning(disable: 4146) // unary minus operator applied to unsigned type, result still unsigned

View File

@ -1,5 +1,9 @@
%module derived_byvalue
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%inline %{
struct Foo {

View File

@ -1,5 +1,9 @@
%module(directors="1") director_basic
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%warnfilter(SWIGWARN_TYPEMAP_THREAD_UNSAFE,SWIGWARN_TYPEMAP_DIRECTOROUT_PTR) MyClass::pmethod;
%{

View File

@ -5,6 +5,10 @@
%warnfilter(SWIGWARN_TYPEMAP_THREAD_UNSAFE,SWIGWARN_TYPEMAP_DIRECTOROUT_PTR) Base::Ptr;
%warnfilter(SWIGWARN_TYPEMAP_THREAD_UNSAFE,SWIGWARN_TYPEMAP_DIRECTOROUT_PTR) Base::ConstPtrRef;
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%module(directors="1") director_classes
%feature("director") Base;

View File

@ -1,5 +1,9 @@
%module(directors="1") director_overload
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%feature("director");
#ifdef SWIGPYTHON

View File

@ -2,6 +2,10 @@
%warnfilter(SWIGWARN_TYPEMAP_THREAD_UNSAFE,SWIGWARN_TYPEMAP_DIRECTOROUT_PTR) MyClass::pmethod;
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%{
#include <string>

View File

@ -7,6 +7,10 @@
%module(directors="1") director_thread
#endif
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%begin %{
#define SWIG_JAVA_USE_THREAD_NAME
//#define DEBUG_DIRECTOR_THREAD_NAME

View File

@ -1,5 +1,9 @@
%module extend
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%extend Base {
~Base() {
delete $self;

View File

@ -2,6 +2,10 @@
%warnfilter(SWIGWARN_LANG_IDENTIFIER,SWIGWARN_IGNORE_OPERATOR_PLUSEQ);
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
// This testcase checks that %feature is working for templates and non user supplied constructors/destructors and is just generally working
// If the default %exception is used it will not compile. It shouldn't get used.

View File

@ -4,6 +4,10 @@
#define SHARED_PTR_WRAPPERS_IMPLEMENTED
#endif
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
#if defined(SHARED_PTR_WRAPPERS_IMPLEMENTED)
%include <boost_shared_ptr.i>

View File

@ -1,6 +1,10 @@
%module("templatereduce") li_std_map
%feature("trackobjects");
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%inline %{
namespace another {
struct map {

View File

@ -5,6 +5,10 @@
%template(IntPtrVector) std::vector<int *>;
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%inline %{
#include <iostream>
using namespace std;

View File

@ -12,6 +12,10 @@
#endif
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
// bug #491476
%inline %{
struct Outer {

View File

@ -1,5 +1,9 @@
%module nested_template_base
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%inline %{
template <class T> class OuterT {
public:

View File

@ -18,6 +18,9 @@
%rename(Foos) Foo;
#endif
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) type;
#endif
%immutable Spam::type;

View File

@ -1,6 +1,11 @@
/* This test confirms the fix to sourceforge bug #3478922 for R */
%module overload_method
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%inline %{
class Base
{

View File

@ -19,6 +19,10 @@
%rename(Foos) Foo;
#endif
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) type;
#endif
%immutable Spam::type;
%inline %{

View File

@ -21,6 +21,11 @@
#endif
%}
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
/* check __cplusplus case */
%header
%{

View File

@ -12,6 +12,10 @@
SWIGWARN_D_MULTIPLE_INHERITANCE,
SWIGWARN_PHP_MULTIPLE_INHERITANCE) E; /* C#, D, Java, PHP multiple inheritance */
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%nodefaultctor C;
%nodefaultdtor C;
%nodefaultctor E;

View File

@ -4,6 +4,10 @@
%warnfilter(SWIGWARN_RUBY_WRONG_NAME) oss::modules::CavityPackFlags::backward_field;
%warnfilter(SWIGWARN_RUBY_WRONG_NAME) oss::modules::Test::current_profile;
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%inline %{
namespace oss
{

View File

@ -1,5 +1,9 @@
%module template_default_class_parms
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%inline %{
namespace Space {
struct SomeType {};

View File

@ -4,6 +4,10 @@
%feature("python:nondynamic");
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%inline %{
namespace Space {
struct SomeType {};

View File

@ -1,5 +1,9 @@
%module template_typedef_class_template
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%inline %{
namespace Standard {
template <class T, class U > struct Pair {

View File

@ -25,6 +25,10 @@
%typemap(out) Integer2 { /* do nothing */ }
#endif
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%{
typedef int Integer1;
%}

View File

@ -2,6 +2,10 @@
// Similar to template_typedef_class_template
// Testing typemaps of a typedef of a nested class in a template and where the template uses default parameters
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%inline %{
namespace Standard {
template <class T, class U > struct Pair {

View File

@ -4,6 +4,10 @@
// Similar to template_typedef_class_template
// Testing typemaps of a typedef of a nested class in a template and where the template uses default parameters
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%inline %{
namespace Standard {
template <class T, class U > struct Pair {

View File

@ -1,5 +1,9 @@
%module typemap_delete
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) val;
#endif
%typemap(in) Rect* (Rect temp) {
$1 = 0;
will_not_compile

View File

@ -4,6 +4,10 @@
* Opaque types
*/
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
%feature("valuewrapper") C;
class C;

View File

@ -13,6 +13,10 @@
#endif
%}
#ifdef SWIGOCAML
%warnfilter(SWIGWARN_PARSE_KEYWORD) method;
#endif
//
// Check this example with directors wherever possible.
//