Merge branch 'master' into doxygen

This commit is contained in:
Vadim Zeitlin 2018-03-19 21:54:46 +01:00
commit b7f78dd5a7
232 changed files with 5648 additions and 2419 deletions

View file

@ -0,0 +1,4 @@
%module xxx
void bad(double nn = 5e);

View file

@ -0,0 +1,2 @@
cpp_invalid_exponents1.i:3: Error: Exponent does not have any digits
cpp_invalid_exponents1.i:3: Error: Syntax error in input(1).

View file

@ -0,0 +1,4 @@
%module xxx
void bad(double nn = 6.6e);

View file

@ -0,0 +1,2 @@
cpp_invalid_exponents2.i:3: Error: Exponent does not have any digits
cpp_invalid_exponents2.i:3: Error: Syntax error in input(1).

View file

@ -0,0 +1,51 @@
%module cpp_template_duplicate_names
// From test-suite/template_class_reuse.i test
%{
namespace Space {
template <bool B> struct Duplicate1 { void f(){}; };
}
%}
// %warnfilter(SWIGWARN_PARSE_REDEFINED) Space::Duplicate1;
namespace Space {
template <bool B> struct Duplicate1 { void f(){}; };
template <bool B> struct Duplicate1 { void f(){}; };
}
// %warnfilter(SWIGWARN_PARSE_REDEFINED) Space::Duplicate2;
%inline %{
namespace Space {
template <int I> struct Duplicate2 { void n(){}; };
}
%}
%template(Duplicate2_0) Space::Duplicate2<0>;
%template(Duplicate2_0) Space::Duplicate2<0>;
// %warnfilter(SWIGWARN_PARSE_REDEFINED) Space::Duplicate3;
%inline %{
namespace Space {
template <int I> struct Duplicate3 { void n(){}; };
}
%}
%template(Duplicate3) Space::Duplicate3<0>;
%template(Duplicate3) Space::Duplicate3<0>;
%{
namespace Space {
template <bool B> struct Duplicate4 { void f(){}; };
}
%}
// %warnfilter(SWIGWARN_PARSE_REDEFINED) Space::Duplicate4;
namespace Space {
template <bool B> struct Duplicate4 { void f(){}; };
template <bool B> struct Duplicate4 { void f(){}; };
}
%template(Duplicate4) Space::Duplicate4<0>;
%template(Duplicate4) Space::Duplicate4<0>;

View file

@ -0,0 +1,14 @@
cpp_template_duplicate_names.i:14: Warning 302: Identifier 'Duplicate1' redefined (ignored),
cpp_template_duplicate_names.i:13: Warning 302: previous definition of 'Duplicate1'.
cpp_template_duplicate_names.i:14: Warning 302: Identifier 'Duplicate1' redefined (ignored),
cpp_template_duplicate_names.i:13: Warning 302: previous definition of 'Duplicate1'.
cpp_template_duplicate_names.i:25: Warning 302: Identifier 'Duplicate2_0' redefined (ignored) (Renamed from 'Duplicate2< 0 >'),
cpp_template_duplicate_names.i:24: Warning 302: previous definition of 'Duplicate2_0' (Renamed from 'Duplicate2< 0 >').
cpp_template_duplicate_names.i:35: Warning 302: Identifier 'Duplicate3' redefined (ignored) (Renamed from 'Duplicate3< 0 >'),
cpp_template_duplicate_names.i:31: Warning 302: previous definition of 'Duplicate3'.
cpp_template_duplicate_names.i:47: Warning 302: Identifier 'Duplicate4' redefined (ignored),
cpp_template_duplicate_names.i:46: Warning 302: previous definition of 'Duplicate4'.
cpp_template_duplicate_names.i:47: Warning 302: Identifier 'Duplicate4' redefined (ignored),
cpp_template_duplicate_names.i:46: Warning 302: previous definition of 'Duplicate4'.
cpp_template_duplicate_names.i:50: Warning 302: Identifier 'Duplicate4' redefined (ignored) (Renamed from 'Duplicate4< 0 >'),
cpp_template_duplicate_names.i:46: Warning 302: previous definition of 'Duplicate4'.

View file

@ -0,0 +1,43 @@
%module xxx
/* Note: needs -Wextra to see these warnings */
/* Divide by zero */
#define ZERO 0
#if 1%ZERO
#endif
#if 2/ZERO
#endif
#if 1%(5-5)
#endif
#if 2/(55-55)
#endif
/* Floating point */
#if 1.2
#endif
#if 2e3
#endif
#if 0
#elif 8.8
#endif
/* Missing whitespace after preproc directive */
#if123
#endif
#if456e
#endif
#if 0
#warning This should not warn
#elif1
#warning This should also not warn
#endif
#if(1)
#warning Warning okay: #if(1)
#endif

View file

@ -0,0 +1,19 @@
pp_expressions_bad.i:7: Warning 202: Could not evaluate expression '1%ZERO'
pp_expressions_bad.i:7: Warning 202: Error: 'Modulo by zero in expression'
pp_expressions_bad.i:9: Warning 202: Could not evaluate expression '2/ZERO'
pp_expressions_bad.i:9: Warning 202: Error: 'Division by zero in expression'
pp_expressions_bad.i:12: Warning 202: Could not evaluate expression '1%(5-5)'
pp_expressions_bad.i:12: Warning 202: Error: 'Modulo by zero in expression'
pp_expressions_bad.i:14: Warning 202: Could not evaluate expression '2/(55-55)'
pp_expressions_bad.i:14: Warning 202: Error: 'Division by zero in expression'
pp_expressions_bad.i:18: Warning 202: Could not evaluate expression '1.2'
pp_expressions_bad.i:18: Warning 202: Error: 'Floating point constant in preprocessor expression'
pp_expressions_bad.i:21: Warning 202: Could not evaluate expression '2e3'
pp_expressions_bad.i:21: Warning 202: Error: 'Floating point constant in preprocessor expression'
pp_expressions_bad.i:25: Warning 202: Could not evaluate expression '8.8'
pp_expressions_bad.i:25: Warning 202: Error: 'Floating point constant in preprocessor expression'
pp_expressions_bad.i:29: Error: Unknown SWIG preprocessor directive: if123 (if this is a block of target language code, delimit it with %{ and %})
pp_expressions_bad.i:30: Error: Extraneous #endif.
pp_expressions_bad.i:32: Error: Unknown SWIG preprocessor directive: if456e (if this is a block of target language code, delimit it with %{ and %})
pp_expressions_bad.i:33: Error: Extraneous #endif.
pp_expressions_bad.i:42: Warning 204: CPP #warning, "Warning okay: #if(1)".

View file

@ -0,0 +1,7 @@
%module xxx
#if 123e
#endif
#if 456.e
#endif

View file

@ -0,0 +1,6 @@
:EOF: Error: Exponent does not have any digits
pp_invalid_exponents.i:3: Warning 202: Could not evaluate expression '123e'
pp_invalid_exponents.i:3: Warning 202: Error: 'Syntax error'
:EOF: Error: Exponent does not have any digits
pp_invalid_exponents.i:6: Warning 202: Could not evaluate expression '456.e'
pp_invalid_exponents.i:6: Warning 202: Error: 'Syntax error'