mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

Even though most of the inconsistencies in MallocChecker's bug categories were fixed in r302016, one more was introduced in r301913 which was later missed. Patch by Henry Wong! Differential Revision: https://reviews.llvm.org/D43074 llvm-svn: 324680
12 lines
395 B
C
12 lines
395 B
C
// RUN: %clang_analyze_cc1 -analyzer-checker core,unix.Malloc -analyzer-output=plist -o %t.plist -verify %s
|
|
// RUN: FileCheck --input-file=%t.plist %s
|
|
|
|
void free(void *);
|
|
void (*fnptr)(int);
|
|
void foo() {
|
|
free((void *)fnptr); // expected-warning{{Argument to free() is a function pointer}}
|
|
}
|
|
|
|
// Make sure the bug category is correct.
|
|
// CHECK: <key>category</key><string>Memory error</string>
|