llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.26k stars 11.67k forks source link

"for" loop prevents leak diagnostics #8010

Open llvmbot opened 14 years ago

llvmbot commented 14 years ago
Bugzilla Link 7638
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

Building the following test.m file with:

/Volumes/Space/Users/bungi/Source/LLVM/llvm/Release+Asserts/bin/clang -x objective-c --analyze test.m

… I get no diagnostics. But, there are four locals leaked (newOutlineNodes, forecastOutlineNodes, formatter and shortFormatter).

Commenting out the for loop (leaving the body, just not the two lines comprising the start and closing curly of the loop) allows the leaks to be found.

belkadan commented 11 years ago

We have several internal reports of this as well. rdar://problem/11486907

belkadan commented 11 years ago

Bug llvm/llvm-bugzilla-archive#15585 has been marked as a duplicate of this bug.

llvmbot commented 14 years ago

Test case Oops; forgot to add the test case!

llvmbot commented 14 years ago

This is with trunk r108314.

llvmbot commented 14 years ago

assigned to @tkremenek