1 // RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-inline-max-stack-depth=3 -analyzer-config ipa-always-inline-size=3 -verify %s 2 3 void clang_analyzer_eval(int); nested5()4int nested5() { 5 if (5 < 3) 6 return 0; 7 else 8 if (3 == 3) 9 return 0; 10 return 0; 11 } nested4()12int nested4() { 13 return nested5(); 14 } nested3()15int nested3() { 16 return nested4(); 17 } nested2()18int nested2() { 19 return nested3(); 20 } nested1()21int nested1() { 22 return nested2(); 23 } 24 testNested()25void testNested() { 26 clang_analyzer_eval(nested1() == 0); // expected-warning{{TRUE}} 27 } 28 29 // Make sure we terminate a recursive path. recursive()30int recursive() { 31 return recursive(); 32 } callRecursive()33int callRecursive() { 34 return recursive(); 35 } 36 37 int mutuallyRecursive1(); 38 mutuallyRecursive2()39int mutuallyRecursive2() { 40 return mutuallyRecursive1(); 41 } 42 mutuallyRecursive1()43int mutuallyRecursive1() { 44 return mutuallyRecursive2(); 45 } callMutuallyRecursive()46int callMutuallyRecursive() { 47 return mutuallyRecursive1(); 48 } 49