]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Analysis/copypaste/expr-types.cpp
Vendor import of clang trunk r290819:
[FreeBSD/FreeBSD.git] / test / Analysis / copypaste / expr-types.cpp
1 // RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s
2
3 // expected-no-diagnostics
4
5
6 int foo1(int a, int b) {
7   if (a > b)
8     return a;
9   return b;
10 }
11
12 // Different types, so not a clone
13 int foo2(long a, long b) {
14   if (a > b)
15     return a;
16   return b;
17 }