Merge branch 'master' into doxygen
This commit is contained in:
commit
b7f78dd5a7
232 changed files with 5648 additions and 2419 deletions
4
Examples/test-suite/errors/cpp_invalid_exponents1.i
Normal file
4
Examples/test-suite/errors/cpp_invalid_exponents1.i
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
%module xxx
|
||||
|
||||
void bad(double nn = 5e);
|
||||
|
||||
2
Examples/test-suite/errors/cpp_invalid_exponents1.stderr
Normal file
2
Examples/test-suite/errors/cpp_invalid_exponents1.stderr
Normal 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).
|
||||
4
Examples/test-suite/errors/cpp_invalid_exponents2.i
Normal file
4
Examples/test-suite/errors/cpp_invalid_exponents2.i
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
%module xxx
|
||||
|
||||
void bad(double nn = 6.6e);
|
||||
|
||||
2
Examples/test-suite/errors/cpp_invalid_exponents2.stderr
Normal file
2
Examples/test-suite/errors/cpp_invalid_exponents2.stderr
Normal 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).
|
||||
51
Examples/test-suite/errors/cpp_template_duplicate_names.i
Normal file
51
Examples/test-suite/errors/cpp_template_duplicate_names.i
Normal 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>;
|
||||
|
||||
|
|
@ -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'.
|
||||
43
Examples/test-suite/errors/pp_expressions_bad.i
Normal file
43
Examples/test-suite/errors/pp_expressions_bad.i
Normal 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
|
||||
19
Examples/test-suite/errors/pp_expressions_bad.stderr
Normal file
19
Examples/test-suite/errors/pp_expressions_bad.stderr
Normal 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)".
|
||||
7
Examples/test-suite/errors/pp_invalid_exponents.i
Normal file
7
Examples/test-suite/errors/pp_invalid_exponents.i
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
%module xxx
|
||||
|
||||
#if 123e
|
||||
#endif
|
||||
|
||||
#if 456.e
|
||||
#endif
|
||||
6
Examples/test-suite/errors/pp_invalid_exponents.stderr
Normal file
6
Examples/test-suite/errors/pp_invalid_exponents.stderr
Normal 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'
|
||||
Loading…
Add table
Add a link
Reference in a new issue