traversal-path-unification.c revision 0073a5c7ce38e98365c00921316030627b3d129f
1// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.DumpTraversal %s | FileCheck %s 2 3int a(); 4int b(); 5int c(); 6 7void testRemoveDeadBindings() { 8 int i = a(); 9 if (i) 10 a(); 11 else 12 b(); 13 14 // At this point the symbol bound to 'i' is dead. 15 // The effects of a() and b() are identical (they both invalidate globals). 16 // We should unify the two paths here and only get one end-of-path node. 17 c(); 18} 19 20// CHECK: --END PATH-- 21// CHECK-NOT: --END PATH--