[LLVMbugs] [Bug 7494] New: False positive in branch/while loop

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 25 11:43:04 PDT 2010


           Summary: False positive in branch/while loop
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: simon at sxw.org.uk
                CC: llvmbugs at cs.uiuc.edu

The following test:

extern void dummy(int a);

test(int a, int b) {
    int c;

    if (a != b) {
        while(a != b) {
           c = a;
           a = b;


/Users/sxw/checker-242/libexec/ccc-analyzer    -c -o test.o test.c
test.c:12:9: warning: Pass-by-value argument in function call is undefined
        ^     ~
1 warning generated.

But for the call to dummy to be reached, c must be defined.

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.

More information about the llvm-bugs mailing list