mirror of https://github.com/swig/swig
Warning fix for redefined friend declarations that are also constexpr
This commit is contained in:
parent
031dc22686
commit
1e2b0b8079
|
@ -3,12 +3,12 @@
|
|||
template<typename T> T template_friend1(T);
|
||||
template<typename T> T template_friend1(T);
|
||||
struct MyTemplate1 {
|
||||
template<typename T> friend T template_friend1(T);
|
||||
template<typename T> constexpr friend T template_friend1(T);
|
||||
};
|
||||
|
||||
template<typename T> T template_friend2(T);
|
||||
struct MyTemplate2 {
|
||||
template<typename T> friend T template_friend2(T);
|
||||
template<typename T> constexpr friend T template_friend2(T);
|
||||
};
|
||||
template<typename T> T template_friend2(T);
|
||||
|
||||
|
@ -16,11 +16,11 @@ template<typename T> T template_friend2(T);
|
|||
int normal_friend1(int);
|
||||
int normal_friend1(int);
|
||||
struct MyClass1 {
|
||||
friend int normal_friend1(int);
|
||||
constexpr friend int normal_friend1(int);
|
||||
};
|
||||
|
||||
int normal_friend2(int);
|
||||
struct MyClass2 {
|
||||
friend int normal_friend2(int);
|
||||
constexpr friend int normal_friend2(int);
|
||||
};
|
||||
int normal_friend2(int);
|
||||
|
|
|
@ -993,7 +993,7 @@ void Swig_symbol_conflict_warn(Node *n, Node *c, const String *symname, int incl
|
|||
if (redefined) {
|
||||
Swig_warning(WARN_PARSE_REDEFINED, Getfile(n), Getline(n), "%s\n", en);
|
||||
Swig_warning(WARN_PARSE_REDEFINED, Getfile(c), Getline(c), "%s\n", ec);
|
||||
} else if (!Checkattr(n, "storage", "friend") && !Checkattr(c, "storage", "friend")) {
|
||||
} else if (!Strstr(Getattr(n, "storage"), "friend") && !Strstr(Getattr(c, "storage"), "friend")) {
|
||||
Swig_warning(WARN_PARSE_REDUNDANT, Getfile(n), Getline(n), "%s\n", en);
|
||||
Swig_warning(WARN_PARSE_REDUNDANT, Getfile(c), Getline(c), "%s\n", ec);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue