Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / copypaste / dbus_autogenerated.cpp
blob1824375658130bfaf4aeded299e7833b4320fa7b
1 // RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:IgnoredFilesPattern="moc_|dbus_|.*_automoc" -verify %s
3 // Because files that have `dbus_' in their names are most likely autogenerated,
4 // we suppress copy-paste warnings here.
6 // expected-no-diagnostics
8 void f1() {
9 int *p1 = new int[1];
10 int *p2 = new int[1];
11 if (p1) {
12 delete [] p1;
13 p1 = nullptr;
15 if (p2) {
16 delete [] p1; // no-warning
17 p2 = nullptr;