1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix,osx,alpha.unix,alpha.security.taint -analyzer-store region -verify %s
2 // expected-no-diagnostics
3 
4 class Evil {
5 public:
6   void system(int); // taint checker
7   void malloc(void *); // taint checker, malloc checker
8   void free(); // malloc checker, keychain checker
9   void fopen(); // stream checker
10   void feof(int, int); // stream checker
11   void open(); // unix api checker
12 };
13 
test(Evil & E)14 void test(Evil &E) {
15   // no warnings, no crashes
16   E.system(0);
17   E.malloc(0);
18   E.free();
19   E.fopen();
20   E.feof(0,1);
21   E.open();
22 }
23