Reduce noise for irrelevant warnings somewhat
...other options to avoid such irrelevant warnings can be to move code to an include file and/or to define a dummy main() accessing otherwise unreferenced entities. Change-Id: Ifd44e376b35ef68496f3aba6a3c046d684824000
This commit is contained in:
parent
2a83720fd1
commit
1034ee0c09
@ -10,25 +10,25 @@
|
|||||||
|
|
||||||
class S final {
|
class S final {
|
||||||
protected:
|
protected:
|
||||||
void f(int f) { f1 = f; } // expected-error {{final class should not have protected members - convert them to private [loplugin:finalprotected]}} expected-error {{Unreferenced externally visible function definition [loplugin:unreffun]}}
|
void f(int f) { f1 = f; } // expected-error {{final class should not have protected members - convert them to private [loplugin:finalprotected]}} expected-error {{[loplugin:unreffun]}}
|
||||||
int f1; // expected-error {{final class should not have protected members - convert them to private [loplugin:finalprotected]}}
|
int f1; // expected-error {{final class should not have protected members - convert them to private [loplugin:finalprotected]}}
|
||||||
public:
|
public:
|
||||||
void g(); // expected-error {{extern prototype in main file without definition [loplugin:externandnotdefined]}} expected-error {{Unreferenced function declaration [loplugin:unreffun]}}
|
void g(); // expected-error {{[loplugin:externandnotdefined]}} expected-error {{[loplugin:unreffun]}}
|
||||||
int g1;
|
int g1;
|
||||||
private:
|
private:
|
||||||
void h(); // expected-error {{extern prototype in main file without definition [loplugin:externandnotdefined]}} expected-error {{Unreferenced function declaration [loplugin:unreffun]}}
|
void h(); // expected-error {{[loplugin:externandnotdefined]}} expected-error {{[loplugin:unreffun]}}
|
||||||
int h1;
|
int h1;
|
||||||
};
|
};
|
||||||
|
|
||||||
class S2 {
|
class S2 {
|
||||||
protected:
|
protected:
|
||||||
void f(int f) { f1 = f; } // expected-error {{Unreferenced externally visible function definition [loplugin:unreffun]}}
|
void f(int f) { f1 = f; } // expected-error {{[loplugin:unreffun]}}
|
||||||
int f1;
|
int f1;
|
||||||
public:
|
public:
|
||||||
void g(); // expected-error {{extern prototype in main file without definition [loplugin:externandnotdefined]}} expected-error {{Unreferenced function declaration [loplugin:unreffun]}}
|
void g(); // expected-error {{[loplugin:externandnotdefined]}} expected-error {{[loplugin:unreffun]}}
|
||||||
int g1;
|
int g1;
|
||||||
private:
|
private:
|
||||||
void h(); // expected-error {{extern prototype in main file without definition [loplugin:externandnotdefined]}} expected-error {{Unreferenced function declaration [loplugin:unreffun]}}
|
void h(); // expected-error {{[loplugin:externandnotdefined]}} expected-error {{[loplugin:unreffun]}}
|
||||||
int h1;
|
int h1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user