Raphael Isemann | 561f0de | 2017-09-04 05:56:36 +0000 | [diff] [blame^] | 1 | // RUN: %clang_analyze_cc1 -fms-extensions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s |
Artem Dergachev | 78692ea | 2016-08-02 12:21:09 +0000 | [diff] [blame] | 2 | |
| 3 | // expected-no-diagnostics |
| 4 | |
| 5 | bool 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 |
| 13 | bool foo2(int x) { |
| 14 | if (x < 0) { |
| 15 | __if_not_exists(x) { return false; } |
| 16 | } |
| 17 | return true; |
| 18 | } |