Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / cxx-method-names.cpp
blob22ec4db34796bc46c173db2e7d79f24333ef0b7f
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix,osx,alpha.unix,alpha.security.taint -verify %s
2 // expected-no-diagnostics
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
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();