Merge remote branch 'upstream/master' into perl5-directors-minimal
This commit is contained in:
commit
0db26ffee2
11 changed files with 427 additions and 128 deletions
|
|
@ -705,6 +705,8 @@ int yylex(void) {
|
|||
}
|
||||
if (strcmp(yytext, "throw") == 0)
|
||||
return (THROW);
|
||||
if (strcmp(yytext, "noexcept") == 0)
|
||||
return (NOEXCEPT);
|
||||
if (strcmp(yytext, "try") == 0)
|
||||
return (yylex());
|
||||
if (strcmp(yytext, "catch") == 0)
|
||||
|
|
@ -728,6 +730,9 @@ int yylex(void) {
|
|||
if (strcmp(yytext, "delete") == 0) {
|
||||
return (DELETE_KW);
|
||||
}
|
||||
if (strcmp(yytext, "default") == 0) {
|
||||
return (DEFAULT);
|
||||
}
|
||||
if (strcmp(yytext, "using") == 0) {
|
||||
return (USING);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -447,6 +447,14 @@ static void add_symbols(Node *n) {
|
|||
n = nextSibling(n);
|
||||
continue;
|
||||
}
|
||||
if (cparse_cplusplus) {
|
||||
String *value = Getattr(n, "value");
|
||||
if (value && Strcmp(value, "delete") == 0) {
|
||||
/* C++11 deleted definition / deleted function */
|
||||
SetFlag(n,"deleted");
|
||||
SetFlag(n,"feature:ignore");
|
||||
}
|
||||
}
|
||||
if (only_csymbol || GetFlag(n,"feature:ignore")) {
|
||||
/* Only add to C symbol table and continue */
|
||||
Swig_symbol_add(0, n);
|
||||
|
|
@ -1661,6 +1669,7 @@ static void tag_nodes(Node *n, const_String_or_char_ptr attrname, DOH *value) {
|
|||
String *bitfield;
|
||||
Parm *throws;
|
||||
String *throwf;
|
||||
String *nexcept;
|
||||
} dtype;
|
||||
struct {
|
||||
char *type;
|
||||
|
|
@ -1675,6 +1684,7 @@ static void tag_nodes(Node *n, const_String_or_char_ptr attrname, DOH *value) {
|
|||
short have_parms;
|
||||
ParmList *throws;
|
||||
String *throwf;
|
||||
String *nexcept;
|
||||
} decl;
|
||||
Parm *tparms;
|
||||
struct {
|
||||
|
|
@ -1708,14 +1718,14 @@ static void tag_nodes(Node *n, const_String_or_char_ptr attrname, DOH *value) {
|
|||
%token ILLEGAL CONSTANT
|
||||
%token NAME RENAME NAMEWARN EXTEND PRAGMA FEATURE VARARGS
|
||||
%token ENUM
|
||||
%token CLASS TYPENAME PRIVATE PUBLIC PROTECTED COLON STATIC VIRTUAL FRIEND THROW CATCH EXPLICIT AUTO
|
||||
%token CLASS TYPENAME PRIVATE PUBLIC PROTECTED COLON STATIC VIRTUAL FRIEND THROW CATCH EXPLICIT AUTO NOEXCEPT
|
||||
%token STATIC_ASSERT CONSTEXPR THREAD_LOCAL DECLTYPE /* C++11 keywords */
|
||||
%token USING
|
||||
%token <node> NAMESPACE
|
||||
%token NATIVE INLINE
|
||||
%token TYPEMAP EXCEPT ECHO APPLY CLEAR SWIGTEMPLATE FRAGMENT
|
||||
%token WARN
|
||||
%token LESSTHAN GREATERTHAN DELETE_KW
|
||||
%token LESSTHAN GREATERTHAN DELETE_KW DEFAULT
|
||||
%token LESSTHANOREQUALTO GREATERTHANOREQUALTO EQUALTO NOTEQUALTO
|
||||
%token ARROW
|
||||
%token QUESTIONMARK
|
||||
|
|
@ -1763,7 +1773,7 @@ static void tag_nodes(Node *n, const_String_or_char_ptr attrname, DOH *value) {
|
|||
%type <node> kwargs options;
|
||||
|
||||
/* Misc */
|
||||
%type <dtype> initializer cpp_const ;
|
||||
%type <dtype> initializer cpp_const exception_specification;
|
||||
%type <id> storage_class;
|
||||
%type <pl> parms ptail rawparms varargs_parms ;
|
||||
%type <pl> templateparameters templateparameterstail;
|
||||
|
|
@ -1775,7 +1785,7 @@ static void tag_nodes(Node *n, const_String_or_char_ptr attrname, DOH *value) {
|
|||
%type <str> ellipsis variadic;
|
||||
%type <type> type rawtype type_right anon_bitfield_type decltype ;
|
||||
%type <bases> base_list inherit raw_inherit;
|
||||
%type <dtype> definetype def_args etype;
|
||||
%type <dtype> definetype def_args etype default_delete deleted_definition explicit_default;
|
||||
%type <dtype> expr exprnum exprcompound valexpr;
|
||||
%type <id> ename ;
|
||||
%type <id> template_decl;
|
||||
|
|
@ -3226,6 +3236,7 @@ c_decl : storage_class type declarator initializer c_decl_tail {
|
|||
Setattr($$,"value",$4.val);
|
||||
Setattr($$,"throws",$4.throws);
|
||||
Setattr($$,"throw",$4.throwf);
|
||||
Setattr($$,"noexcept",$4.nexcept);
|
||||
if (!$5) {
|
||||
if (Len(scanner_ccode)) {
|
||||
String *code = Copy(scanner_ccode);
|
||||
|
|
@ -3285,6 +3296,7 @@ c_decl : storage_class type declarator initializer c_decl_tail {
|
|||
Setattr($$,"value",$6.val);
|
||||
Setattr($$,"throws",$6.throws);
|
||||
Setattr($$,"throw",$6.throwf);
|
||||
Setattr($$,"noexcept",$6.nexcept);
|
||||
if (!$7) {
|
||||
if (Len(scanner_ccode)) {
|
||||
String *code = Copy(scanner_ccode);
|
||||
|
|
@ -3344,6 +3356,7 @@ c_decl_tail : SEMI {
|
|||
Setattr($$,"value",$3.val);
|
||||
Setattr($$,"throws",$3.throws);
|
||||
Setattr($$,"throw",$3.throwf);
|
||||
Setattr($$,"noexcept",$3.nexcept);
|
||||
if ($3.bitfield) {
|
||||
Setattr($$,"bitfield", $3.bitfield);
|
||||
}
|
||||
|
|
@ -3368,24 +3381,28 @@ initializer : def_args {
|
|||
$$.qualifier = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
| type_qualifier def_args {
|
||||
$$ = $2;
|
||||
$$.qualifier = $1;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
| THROW LPAREN parms RPAREN def_args {
|
||||
$$ = $5;
|
||||
| exception_specification def_args {
|
||||
$$ = $2;
|
||||
$$.qualifier = 0;
|
||||
$$.throws = $3;
|
||||
$$.throwf = NewString("1");
|
||||
$$.throws = $1.throws;
|
||||
$$.throwf = $1.throwf;
|
||||
$$.nexcept = $1.nexcept;
|
||||
}
|
||||
| type_qualifier THROW LPAREN parms RPAREN def_args {
|
||||
$$ = $6;
|
||||
| type_qualifier exception_specification def_args {
|
||||
$$ = $3;
|
||||
$$.qualifier = $1;
|
||||
$$.throws = $4;
|
||||
$$.throwf = NewString("1");
|
||||
$$.throws = $2.throws;
|
||||
$$.throwf = $2.throwf;
|
||||
$$.nexcept = $2.nexcept;
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -3661,6 +3678,7 @@ c_constructor_decl : storage_class type LPAREN parms RPAREN ctor_end {
|
|||
}
|
||||
Setattr($$,"throws",$6.throws);
|
||||
Setattr($$,"throw",$6.throwf);
|
||||
Setattr($$,"noexcept",$6.nexcept);
|
||||
err = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -4690,12 +4708,15 @@ cpp_constructor_decl : storage_class type LPAREN parms RPAREN ctor_end {
|
|||
Setattr($$,"decl",decl);
|
||||
Setattr($$,"throws",$6.throws);
|
||||
Setattr($$,"throw",$6.throwf);
|
||||
Setattr($$,"noexcept",$6.nexcept);
|
||||
if (Len(scanner_ccode)) {
|
||||
String *code = Copy(scanner_ccode);
|
||||
Setattr($$,"code",code);
|
||||
Delete(code);
|
||||
}
|
||||
SetFlag($$,"feature:new");
|
||||
if ($6.defarg)
|
||||
Setattr($$,"value",$6.defarg);
|
||||
} else {
|
||||
$$ = 0;
|
||||
}
|
||||
|
|
@ -4723,6 +4744,9 @@ cpp_destructor_decl : NOT idtemplate LPAREN parms RPAREN cpp_end {
|
|||
}
|
||||
Setattr($$,"throws",$6.throws);
|
||||
Setattr($$,"throw",$6.throwf);
|
||||
Setattr($$,"noexcept",$6.nexcept);
|
||||
if ($6.val)
|
||||
Setattr($$,"value",$6.val);
|
||||
add_symbols($$);
|
||||
}
|
||||
|
||||
|
|
@ -4738,9 +4762,9 @@ cpp_destructor_decl : NOT idtemplate LPAREN parms RPAREN cpp_end {
|
|||
Delete(name);
|
||||
Setattr($$,"throws",$7.throws);
|
||||
Setattr($$,"throw",$7.throwf);
|
||||
if ($7.val) {
|
||||
Setattr($$,"value","0");
|
||||
}
|
||||
Setattr($$,"noexcept",$7.nexcept);
|
||||
if ($7.val)
|
||||
Setattr($$,"value",$7.val);
|
||||
if (Len(scanner_ccode)) {
|
||||
String *code = Copy(scanner_ccode);
|
||||
Setattr($$,"code",code);
|
||||
|
|
@ -4982,13 +5006,24 @@ cpp_swig_directive: pragma_directive { $$ = $1; }
|
|||
|
||||
cpp_end : cpp_const SEMI {
|
||||
Clear(scanner_ccode);
|
||||
$$.val = 0;
|
||||
$$.throws = $1.throws;
|
||||
$$.throwf = $1.throwf;
|
||||
$$.nexcept = $1.nexcept;
|
||||
}
|
||||
| cpp_const EQUAL default_delete SEMI {
|
||||
Clear(scanner_ccode);
|
||||
$$.val = $3.val;
|
||||
$$.throws = $1.throws;
|
||||
$$.throwf = $1.throwf;
|
||||
$$.nexcept = $1.nexcept;
|
||||
}
|
||||
| cpp_const LBRACE {
|
||||
skip_balanced('{','}');
|
||||
$$.val = 0;
|
||||
$$.throws = $1.throws;
|
||||
$$.throwf = $1.throwf;
|
||||
$$.nexcept = $1.nexcept;
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -4999,6 +5034,7 @@ cpp_vend : cpp_const SEMI {
|
|||
$$.bitfield = 0;
|
||||
$$.throws = $1.throws;
|
||||
$$.throwf = $1.throwf;
|
||||
$$.nexcept = $1.nexcept;
|
||||
}
|
||||
| cpp_const EQUAL definetype SEMI {
|
||||
Clear(scanner_ccode);
|
||||
|
|
@ -5007,6 +5043,7 @@ cpp_vend : cpp_const SEMI {
|
|||
$$.bitfield = 0;
|
||||
$$.throws = $1.throws;
|
||||
$$.throwf = $1.throwf;
|
||||
$$.nexcept = $1.nexcept;
|
||||
}
|
||||
| cpp_const LBRACE {
|
||||
skip_balanced('{','}');
|
||||
|
|
@ -5015,6 +5052,7 @@ cpp_vend : cpp_const SEMI {
|
|||
$$.bitfield = 0;
|
||||
$$.throws = $1.throws;
|
||||
$$.throwf = $1.throwf;
|
||||
$$.nexcept = $1.nexcept;
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -5066,6 +5104,7 @@ storage_class : EXTERN { $$ = "extern"; }
|
|||
| FRIEND { $$ = "friend"; }
|
||||
| EXPLICIT { $$ = "explicit"; }
|
||||
| CONSTEXPR { $$ = "constexpr"; }
|
||||
| STATIC CONSTEXPR { $$ = "static constexpr"; }
|
||||
| THREAD_LOCAL { $$ = "thread_local"; }
|
||||
| THREAD_LOCAL STATIC { $$ = "static thread_local"; }
|
||||
| STATIC THREAD_LOCAL { $$ = "static thread_local"; }
|
||||
|
|
@ -5203,6 +5242,7 @@ def_args : EQUAL definetype {
|
|||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
}
|
||||
| EQUAL definetype LBRACKET expr RBRACKET {
|
||||
|
|
@ -5215,6 +5255,7 @@ def_args : EQUAL definetype {
|
|||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
} else {
|
||||
$$.val = NewStringf("%s[%s]",$2.val,$4.val);
|
||||
}
|
||||
|
|
@ -5227,6 +5268,7 @@ def_args : EQUAL definetype {
|
|||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
| COLON expr {
|
||||
$$.val = 0;
|
||||
|
|
@ -5235,6 +5277,7 @@ def_args : EQUAL definetype {
|
|||
$$.bitfield = $2.val;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
| empty {
|
||||
$$.val = 0;
|
||||
|
|
@ -5243,6 +5286,7 @@ def_args : EQUAL definetype {
|
|||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -6143,11 +6187,16 @@ definetype : { /* scanner_check_typedef(); */ } expr {
|
|||
} else if ($$.type != T_CHAR && $$.type != T_WSTRING && $$.type != T_WCHAR) {
|
||||
$$.rawval = 0;
|
||||
}
|
||||
$$.qualifier = 0;
|
||||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
scanner_ignore_typedef();
|
||||
}
|
||||
| default_delete {
|
||||
$$ = $1;
|
||||
}
|
||||
/*
|
||||
| string {
|
||||
$$.val = NewString($1);
|
||||
|
|
@ -6156,10 +6205,45 @@ definetype : { /* scanner_check_typedef(); */ } expr {
|
|||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
*/
|
||||
;
|
||||
|
||||
default_delete : deleted_definition {
|
||||
$$ = $1;
|
||||
}
|
||||
| explicit_default {
|
||||
$$ = $1;
|
||||
}
|
||||
;
|
||||
|
||||
/* For C++ deleted definition '= delete' */
|
||||
deleted_definition : DELETE_KW {
|
||||
$$.val = NewString("delete");
|
||||
$$.rawval = 0;
|
||||
$$.type = T_STRING;
|
||||
$$.qualifier = 0;
|
||||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
;
|
||||
|
||||
/* For C++ explicitly defaulted functions '= default' */
|
||||
explicit_default : DEFAULT {
|
||||
$$.val = NewString("default");
|
||||
$$.rawval = 0;
|
||||
$$.type = T_STRING;
|
||||
$$.qualifier = 0;
|
||||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
;
|
||||
|
||||
/* Some stuff for handling enums */
|
||||
|
||||
ename : ID { $$ = $1; }
|
||||
|
|
@ -6276,6 +6360,7 @@ valexpr : exprnum { $$ = $1; }
|
|||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
| WCHARCONST {
|
||||
$$.val = NewString($1);
|
||||
|
|
@ -6288,6 +6373,7 @@ valexpr : exprnum { $$ = $1; }
|
|||
$$.bitfield = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
|
||||
/* grouping */
|
||||
|
|
@ -6613,25 +6699,43 @@ opt_virtual : VIRTUAL
|
|||
| empty
|
||||
;
|
||||
|
||||
cpp_const : type_qualifier {
|
||||
$$.qualifier = $1;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
}
|
||||
| THROW LPAREN parms RPAREN {
|
||||
$$.qualifier = 0;
|
||||
exception_specification : THROW LPAREN parms RPAREN {
|
||||
$$.throws = $3;
|
||||
$$.throwf = NewString("1");
|
||||
}
|
||||
| type_qualifier THROW LPAREN parms RPAREN {
|
||||
$$.qualifier = $1;
|
||||
$$.throws = $4;
|
||||
$$.throwf = NewString("1");
|
||||
}
|
||||
| empty {
|
||||
$$.qualifier = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
| NOEXCEPT {
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = NewString("true");
|
||||
}
|
||||
|
||||
| NOEXCEPT LPAREN expr RPAREN {
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = $3.val;
|
||||
}
|
||||
;
|
||||
|
||||
cpp_const : type_qualifier {
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
$$.qualifier = $1;
|
||||
}
|
||||
| exception_specification {
|
||||
$$ = $1;
|
||||
$$.qualifier = 0;
|
||||
}
|
||||
| type_qualifier exception_specification {
|
||||
$$ = $2;
|
||||
$$.qualifier = $1;
|
||||
}
|
||||
| empty {
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
$$.qualifier = 0;
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -6641,6 +6745,7 @@ ctor_end : cpp_const ctor_initializer SEMI {
|
|||
$$.defarg = 0;
|
||||
$$.throws = $1.throws;
|
||||
$$.throwf = $1.throwf;
|
||||
$$.nexcept = $1.nexcept;
|
||||
}
|
||||
| cpp_const ctor_initializer LBRACE {
|
||||
skip_balanced('{','}');
|
||||
|
|
@ -6648,6 +6753,7 @@ ctor_end : cpp_const ctor_initializer SEMI {
|
|||
$$.defarg = 0;
|
||||
$$.throws = $1.throws;
|
||||
$$.throwf = $1.throwf;
|
||||
$$.nexcept = $1.nexcept;
|
||||
}
|
||||
| LPAREN parms RPAREN SEMI {
|
||||
Clear(scanner_ccode);
|
||||
|
|
@ -6656,6 +6762,7 @@ ctor_end : cpp_const ctor_initializer SEMI {
|
|||
$$.defarg = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
| LPAREN parms RPAREN LBRACE {
|
||||
skip_balanced('{','}');
|
||||
|
|
@ -6664,12 +6771,21 @@ ctor_end : cpp_const ctor_initializer SEMI {
|
|||
$$.defarg = 0;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
| EQUAL definetype SEMI {
|
||||
$$.have_parms = 0;
|
||||
$$.defarg = $2.val;
|
||||
$$.throws = 0;
|
||||
$$.throwf = 0;
|
||||
$$.nexcept = 0;
|
||||
}
|
||||
| exception_specification EQUAL default_delete SEMI {
|
||||
$$.have_parms = 0;
|
||||
$$.defarg = $3.val;
|
||||
$$.throws = $1.throws;
|
||||
$$.throwf = $1.throwf;
|
||||
$$.nexcept = $1.nexcept;
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -6711,6 +6827,7 @@ template_decl : LESSTHAN valparms GREATERTHAN {
|
|||
;
|
||||
|
||||
idstring : ID { $$ = $1; }
|
||||
| default_delete { $$ = $1.val; }
|
||||
| string { $$ = $1; }
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ Allocate():
|
|||
}
|
||||
|
||||
if (!Getattr(n, "allocate:has_destructor")) {
|
||||
/* No destructor was defined. We need to check a few things here too */
|
||||
/* No destructor was defined */
|
||||
List *bases = Getattr(n, "allbases");
|
||||
int allows_destruct = 1;
|
||||
|
||||
|
|
@ -676,13 +676,13 @@ Allocate():
|
|||
}
|
||||
|
||||
if (!Getattr(n, "allocate:has_assign")) {
|
||||
/* No destructor was defined. We need to check a few things here too */
|
||||
/* No assignment operator was defined */
|
||||
List *bases = Getattr(n, "allbases");
|
||||
int allows_assign = 1;
|
||||
|
||||
for (int i = 0; i < Len(bases); i++) {
|
||||
Node *n = Getitem(bases, i);
|
||||
/* If base class does not allow default destructor, we don't allow it either */
|
||||
/* If base class does not allow assignment, we don't allow it either */
|
||||
if (Getattr(n, "allocate:has_assign")) {
|
||||
allows_assign = !Getattr(n, "allocate:noassign");
|
||||
}
|
||||
|
|
@ -693,13 +693,13 @@ Allocate():
|
|||
}
|
||||
|
||||
if (!Getattr(n, "allocate:has_new")) {
|
||||
/* No destructor was defined. We need to check a few things here too */
|
||||
/* No new operator was defined */
|
||||
List *bases = Getattr(n, "allbases");
|
||||
int allows_new = 1;
|
||||
|
||||
for (int i = 0; i < Len(bases); i++) {
|
||||
Node *n = Getitem(bases, i);
|
||||
/* If base class does not allow default destructor, we don't allow it either */
|
||||
/* If base class does not allow new operator, we don't allow it either */
|
||||
if (Getattr(n, "allocate:has_new")) {
|
||||
allows_new = !Getattr(n, "allocate:nonew");
|
||||
}
|
||||
|
|
@ -779,18 +779,26 @@ Allocate():
|
|||
if (cplus_mode != PUBLIC) {
|
||||
if (Strcmp(name, "operator =") == 0) {
|
||||
/* Look for a private assignment operator */
|
||||
Setattr(inclass, "allocate:has_assign", "1");
|
||||
if (!GetFlag(n, "deleted"))
|
||||
Setattr(inclass, "allocate:has_assign", "1");
|
||||
Setattr(inclass, "allocate:noassign", "1");
|
||||
} else if (Strcmp(name, "operator new") == 0) {
|
||||
/* Look for a private new operator */
|
||||
Setattr(inclass, "allocate:has_new", "1");
|
||||
if (!GetFlag(n, "deleted"))
|
||||
Setattr(inclass, "allocate:has_new", "1");
|
||||
Setattr(inclass, "allocate:nonew", "1");
|
||||
}
|
||||
} else {
|
||||
if (Strcmp(name, "operator =") == 0) {
|
||||
Setattr(inclass, "allocate:has_assign", "1");
|
||||
if (!GetFlag(n, "deleted"))
|
||||
Setattr(inclass, "allocate:has_assign", "1");
|
||||
else
|
||||
Setattr(inclass, "allocate:noassign", "1");
|
||||
} else if (Strcmp(name, "operator new") == 0) {
|
||||
Setattr(inclass, "allocate:has_new", "1");
|
||||
if (!GetFlag(n, "deleted"))
|
||||
Setattr(inclass, "allocate:has_new", "1");
|
||||
else
|
||||
Setattr(inclass, "allocate:nonew", "1");
|
||||
}
|
||||
/* Look for smart pointer operator */
|
||||
if ((Strcmp(name, "operator ->") == 0) && (!GetFlag(n, "feature:ignore"))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue