blob: 06aa633fe9638acd32d22e78a04b0674da42ded5 [file] [log] [blame]
Artem Dergachev78692ea2016-08-02 12:21:09 +00001// RUN: %clang_cc1 -analyze -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s
2
3// expected-no-diagnostics
4
5bool a();
6bool b();
7
8// Calls method a with some extra code to pass the minimum complexity
9bool foo1(int x) {
10 if (x > 0)
11 return false;
12 else if (x < 0)
13 return a();
14 return true;
15}
16
17// Calls method b with some extra code to pass the minimum complexity
18bool foo2(int x) {
19 if (x > 0)
20 return false;
21 else if (x < 0)
22 return b();
23 return true;
24}