[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-bugs
Subject:    [LLVMbugs] [Bug 12421] New: Error is detected for function defined in header but no report is genera
From:       bugzilla-daemon () llvm ! org
Date:       2012-03-30 16:18:20
Message-ID: bug-12421-206 () http ! llvm ! org/bugs/
[Download RAW message or body]

http://llvm.org/bugs/show_bug.cgi?id=12421

             Bug #: 12421
           Summary: Error is detected for function defined in header but
                    no report is generated
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek@apple.com
        ReportedBy: roland@utk.edu
                CC: llvmbugs@cs.uiuc.edu
    Classification: Unclassified


Given:
test.c:
#include "test.h"
int main(){
  return f();
}

test.h:
static int f() {
  int *i=0;
  return *i;
}

gives:
$ scan-build c++-analyzer test.cc
In file included from test.cc:1:
./test.h:3:10: warning: Dereference of null pointer (loaded from variable 'i')
  return *i;
         ^~
1 warning generated.
scan-build: Removing directory ... because it contains no reports.

Thus even though the error is detected correctly no report is generated for it.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
LLVMbugs@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic