only unit-test one loplugin at a time

tell the plugin code when we are unit-testing it, so we can suppress all
the warnings except for the plugin we are currently testing

Change-Id: I240c8e37eba90c219e53c29531a3a43bc841a1c8
This commit is contained in:
Noel Grandin
2017-06-19 09:00:59 +02:00
parent d3e0ab976a
commit 45c06838e9
10 changed files with 33 additions and 22 deletions

View File

@@ -10,7 +10,7 @@
class Foo {
char* m_pbar; // expected-note {{member is here [loplugin:useuniqueptr]}}
~Foo() // expected-error {{Unreferenced externally visible function definition [loplugin:unreffun]}}
~Foo()
{
delete m_pbar; // expected-error {{a destructor with only a single unconditional call to delete on a member, is a sure sign it should be using std::unique_ptr for that field [loplugin:useuniqueptr]}}
m_pbar = nullptr;