blob: 9046353d0f0731213fa260d86433d502c693538b [file] [log] [blame]
Dominic Chen184c6242017-03-03 18:02:02 +00001// RUN: %clang_analyze_cc1 -fms-extensions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s
Artem Dergachev78692ea2016-08-02 12:21:09 +00002
3// expected-no-diagnostics
4
5bool foo1(int x) {
6 if (x < 0) {
7 __if_exists(x) { return false; }
8 }
9 return true;
10}
11
12// Same as above, but __if_not_exists
13bool foo2(int x) {
14 if (x < 0) {
15 __if_not_exists(x) { return false; }
16 }
17 return true;
18}