Fix line/file info for methods added by using declarations
This commit is contained in:
parent
eb32a6298d
commit
961424a986
3 changed files with 13 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
||||||
|
%module xxx
|
||||||
|
|
||||||
|
struct Base {
|
||||||
|
void m(bool) {}
|
||||||
|
};
|
||||||
|
struct Derived : Base {
|
||||||
|
void m(bool) const {}
|
||||||
|
using Base::m;
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
cpp_using_declaration_overload.i:7: Warning 512: Overloaded method Derived::m(bool) const ignored,
|
||||||
|
cpp_using_declaration_overload.i:8: Warning 512: using non-const method m(bool) instead.
|
||||||
|
|
@ -1074,6 +1074,8 @@ class TypePass:private Dispatcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Node *nn = copyNode(c);
|
Node *nn = copyNode(c);
|
||||||
|
Setfile(nn, Getfile(n));
|
||||||
|
Setline(nn, Getline(n));
|
||||||
Delattr(nn, "access"); // access might be different from the method in the base class
|
Delattr(nn, "access"); // access might be different from the method in the base class
|
||||||
Setattr(nn, "access", Getattr(n, "access"));
|
Setattr(nn, "access", Getattr(n, "access"));
|
||||||
if (!Getattr(nn, "sym:name"))
|
if (!Getattr(nn, "sym:name"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue