summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/test/useuniqueptr.cxx4
-rw-r--r--compilerplugins/clang/useuniqueptr.cxx2
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")