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