fix friend bug #1323114
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7670 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
08e81e1a7f
commit
f62b5ed28f
2 changed files with 23 additions and 2 deletions
|
|
@ -132,6 +132,28 @@
|
||||||
private:
|
private:
|
||||||
C val;
|
C val;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace ns1 {
|
||||||
|
|
||||||
|
void bas() {}
|
||||||
|
|
||||||
|
void baz() {}
|
||||||
|
|
||||||
|
namespace ns2 {
|
||||||
|
class Foo {
|
||||||
|
public:
|
||||||
|
Foo::Foo() {};
|
||||||
|
friend void bar();
|
||||||
|
friend void ns1::baz();
|
||||||
|
void Foo::member() { }
|
||||||
|
|
||||||
|
};
|
||||||
|
void bar() {}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%template(D_i) D<int>;
|
%template(D_i) D<int>;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ int is_member_director(Node* member)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Clean overloaded list. Removes templates, friends, ignored, and errors */
|
/* Clean overloaded list. Removes templates, ignored, and errors */
|
||||||
|
|
||||||
void clean_overloaded(Node *n) {
|
void clean_overloaded(Node *n) {
|
||||||
Node *nn = Getattr(n,"sym:overloaded");
|
Node *nn = Getattr(n,"sym:overloaded");
|
||||||
|
|
@ -52,7 +52,6 @@ void clean_overloaded(Node *n) {
|
||||||
if ((Strcmp(nodeType(nn),"template") == 0) ||
|
if ((Strcmp(nodeType(nn),"template") == 0) ||
|
||||||
(GetFlag(nn,"feature:ignore")) ||
|
(GetFlag(nn,"feature:ignore")) ||
|
||||||
(Getattr(nn,"error")) ||
|
(Getattr(nn,"error")) ||
|
||||||
// (checkAttribute(nn,"storage","friend")) ||
|
|
||||||
((Strcmp(nodeType(nn),"using") == 0) && !firstChild(nn))) {
|
((Strcmp(nodeType(nn),"using") == 0) && !firstChild(nn))) {
|
||||||
/* Remove from overloaded list */
|
/* Remove from overloaded list */
|
||||||
Node *ps = Getattr(nn,"sym:previousSibling");
|
Node *ps = Getattr(nn,"sym:previousSibling");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue