[cfe-dev] Expected behaviour of the analyzer with alpha.unix.Stream checker.

Marco Grossi marco.grossi at studenti.unipr.it
Tue Feb 26 07:48:03 PST 2013


Hi All,

I've a question regarding the non-deterministic results that I encounter 
applying the analyzer on the attached test case.

Command executed(here without search paths for includefile):
/tmp/build/Debug+Asserts/bin/clang++ -cc1 -analyze -analyzer-store 
region test__alpha_unix_Stream.cc -analyze-function main 
-analyzer-checker=alpha.unix.Stream

$ /tmp/build/Debug+Asserts/bin/clang++ -v
clang version 3.3 (trunk 176090)
Target: x86_64-unknown-linux-gnu
Thread model: posix

Sometimes the run does not report bug, and sometime report:
  test__alpha_unix_Stream.cc:28:3: warning: Opened File never closed. 
Potential Resource leak

I cannot understand if this is the expected behaviour, or mine mistake 
on analyzer's invocation, or a bug in the alpha.unix.Stream checker or 
elsewhere.


  Thanks
   Marco

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test__alpha_unix_Stream.cc
Type: text/x-c
Size: 398 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130226/2d7c32e2/attachment.bin>


More information about the cfe-dev mailing list