diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-12-09 10:12:13 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-12-10 11:46:41 +0100 |
commit | 88738347f81be508a639dd75f3a8627bee21d20a (patch) | |
tree | 794595a927165e286704a0f0d5aa0a9b60ff42f3 /compilerplugins | |
parent | c56b2e3f8dc260e9927289ca382534f491b97aba (diff) |
cppcheck: incorrectStringBooleanError
Change-Id: I7f4bce8444c6c022d856d20b06de4a4834148ea2
Reviewed-on: https://gerrit.libreoffice.org/64834
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/test/useuniqueptr.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/useuniqueptr.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/test/useuniqueptr.cxx b/compilerplugins/clang/test/useuniqueptr.cxx index 5f20c734958c..74f8ae10a0bb 100644 --- a/compilerplugins/clang/test/useuniqueptr.cxx +++ b/compilerplugins/clang/test/useuniqueptr.cxx @@ -231,8 +231,8 @@ class Foo18 { void foo19() { std::vector<char*> vec; // expected-note {{var is here [loplugin:useuniqueptr]}} - for(char * p : vec) - delete p; // expected-error {{rather manage this var with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr]}} + for(char * p : vec) // expected-note {{var is here [loplugin:useuniqueptr]}} + delete p; // expected-error {{rather manage this var with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr]}} expected-error {{call to delete on a var, should be using std::unique_ptr [loplugin:useuniqueptr]}} } // no warning expected diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx index 3aabbccf991a..1f0f9d649317 100644 --- a/compilerplugins/clang/useuniqueptr.cxx +++ b/compilerplugins/clang/useuniqueptr.cxx @@ -511,7 +511,7 @@ void UseUniquePtr::CheckDeleteLocalVar(const FunctionDecl* functionDecl, const C || name == "StgDirEntry::SetSize" || name == "UCBStorage::CopyStorageElement_Impl" || parentName == "SfxItemSet" || parentName == "SfxItemPool" || name == "OutputDevice::ImplDrawPolyPolygon" || name == "OutputDevice::ImplDrawPolyPolygon" - || name == "ImplListBox::InsertEntry" || "Edit::dispose") + || name == "ImplListBox::InsertEntry" || name == "Edit::dispose") return; // very dodgy if (name == "UCBStorage::OpenStorage_Impl") |