Fixed testcase warnings.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11625 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
67b4ad7084
commit
c9fcb01943
7 changed files with 17 additions and 4 deletions
|
|
@ -1,13 +1,15 @@
|
||||||
/* This testcase checks whether Swig correctly uses the new initializer_list
|
/* This testcase checks whether Swig correctly uses the new initializer_list
|
||||||
introduced in C++0x. */
|
introduced in C++0x. */
|
||||||
%module cpp0x_initializer_list
|
%module cpp0x_initializer_list
|
||||||
|
%warnfilter(520) A;
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
|
|
||||||
class A {
|
class A {
|
||||||
public:
|
public:
|
||||||
A( std::initializer_list<int, int> ) {}
|
A( std::initializer_list<int> ) {}
|
||||||
|
A() {}
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@
|
||||||
This module also tests whether Swig correctly parses custom string delimiters.
|
This module also tests whether Swig correctly parses custom string delimiters.
|
||||||
*/
|
*/
|
||||||
%module cpp0x_raw_string_literals
|
%module cpp0x_raw_string_literals
|
||||||
|
%warnfilter(454) c;
|
||||||
|
%warnfilter(454) d;
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@
|
||||||
strongly typed enums. Enums with the same type are comparable. Enum classes
|
strongly typed enums. Enums with the same type are comparable. Enum classes
|
||||||
require support for nested classes. */
|
require support for nested classes. */
|
||||||
%module cpp0x_strongly_typed_enumerations
|
%module cpp0x_strongly_typed_enumerations
|
||||||
|
%warnfilter(302) Val1;
|
||||||
|
%warnfilter(302) Val2;
|
||||||
|
%warnfilter(302) Val3;
|
||||||
|
%warnfilter(302) Val4;
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
enum class Enum1 {
|
enum class Enum1 {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
using the translation unit).
|
using the translation unit).
|
||||||
*/
|
*/
|
||||||
%module cpp0x_template_explicit
|
%module cpp0x_template_explicit
|
||||||
|
%warnfilter(320) std::vector<A>;
|
||||||
|
%warnfilter(320) std::vector<A*>;
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ struct OutputType {
|
||||||
OutputType(int v) { v=val; }
|
OutputType(int v) { v=val; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Note: GCC doesn't support user-defined literals yet! */
|
||||||
struct TT {
|
struct TT {
|
||||||
OutputType operator << (const char * string_values, size_t num_chars) { return OutputType(100); }
|
|
||||||
OutputType operator "" (const char * string_values, size_t num_chars) { return OutputType(100); }
|
OutputType operator "" (const char * string_values, size_t num_chars) { return OutputType(100); }
|
||||||
OutputType operator "" _mySuffix1(const char * string_values, size_t num_chars) { return OutputType(100); }
|
OutputType operator "" _mySuffix1(const char * string_values, size_t num_chars) { return OutputType(100); }
|
||||||
OutputType operator "" _mySuffix2(const wchar_t * string_values, size_t num_chars) { return OutputType(200); }
|
OutputType operator "" _mySuffix2(const wchar_t * string_values, size_t num_chars) { return OutputType(200); }
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@
|
||||||
using variadic number of classes.
|
using variadic number of classes.
|
||||||
*/
|
*/
|
||||||
%module cpp0x_variadic_templates
|
%module cpp0x_variadic_templates
|
||||||
|
%warnfilter(507) MultiArgs1;
|
||||||
|
%warnfilter(507) SizeOf1;
|
||||||
|
%warnfilter(507) MultiInherit1;
|
||||||
|
|
||||||
////////////////////////
|
////////////////////////
|
||||||
// Variadic templates //
|
// Variadic templates //
|
||||||
|
|
|
||||||
|
|
@ -2745,7 +2745,7 @@ template_directive: SWIGTEMPLATE LPAREN idstringopt RPAREN idcolonnt LESSTHAN va
|
||||||
p = tp;
|
p = tp;
|
||||||
def_supplied = 1;
|
def_supplied = 1;
|
||||||
} else if (p && !tp) { /* Variadic template - tp < p */
|
} else if (p && !tp) { /* Variadic template - tp < p */
|
||||||
Swig_warning(0,cparse_file, cparse_line,"Only the first variadic argument is currently supported by Swig.\n");
|
Swig_warning(WARN_LANG_NATIVE_UNIMPL,cparse_file, cparse_line,"Only the first variadic argument is currently supported by Swig.\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4265,7 +4265,7 @@ cpp_member : c_declaration { $$ = $1; }
|
||||||
|
|
||||||
cpp_constructor_decl : storage_class type LPAREN parms RPAREN ctor_end {
|
cpp_constructor_decl : storage_class type LPAREN parms RPAREN ctor_end {
|
||||||
if (Classprefix) {
|
if (Classprefix) {
|
||||||
if (Getattr($4,"type") && strstr(Char(Getattr($4,"type")), "initializer_list<")) {
|
if ($4 && Getattr($4,"type") && strstr(Char(Getattr($4,"type")), "initializer_list<")) {
|
||||||
/* Ignore constructors containing initializer_list<> introduced in C++0x */
|
/* Ignore constructors containing initializer_list<> introduced in C++0x */
|
||||||
Swig_warning(WARN_LANG_INITIALIZER_LIST, cparse_file, cparse_line, "Constructor with std::initializer_list<> argument ignored.\n");
|
Swig_warning(WARN_LANG_INITIALIZER_LIST, cparse_file, cparse_line, "Constructor with std::initializer_list<> argument ignored.\n");
|
||||||
$$ = 0;
|
$$ = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue