[analyzer] +Testcase: several used-after-free args passed to a function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179232 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Yartsev 2013-04-10 22:36:16 +00:00
Родитель 55e57a50a3
Коммит 337ad7627c
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -114,6 +114,11 @@ void testUseLastArgAfterDelete(int *p) {
f(0, 0, p); // expected-warning{{Use of memory after it is freed}}
}
void testUseSeveralArgsAfterDelete(int *p) {
delete p;
f(p, p, p); // expected-warning{{Use of memory after it is freed}}
}
void testUseRefArgAfterDelete(SomeClass &c) {
delete &c;
g(c); // expected-warning{{Use of memory after it is freed}}