1 // RUN: %clang_analyze_cc1 -std=c11 -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s 2 3 // expected-no-diagnostics 4 5 int global; 6 foo1(void)7int foo1(void) { 8 if (global > 0) 9 return 0; 10 else if (global < 0) 11 return _Generic(global, double: 1, float: 2, default: 3); 12 return 1; 13 } 14 15 // Different associated type (int instead of float) foo2(void)16int foo2(void) { 17 if (global > 0) 18 return 0; 19 else if (global < 0) 20 return _Generic(global, double: 1, int: 2, default: 4); 21 return 1; 22 } 23 24 // Different number of associated types. foo3(void)25int foo3(void) { 26 if (global > 0) 27 return 0; 28 else if (global < 0) 29 return _Generic(global, double: 1, default: 4); 30 return 1; 31 } 32