[LLVMbugs] [Bug 13447] New: false positive with exceptions: 'Undefined or garbage value returned to caller'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 24 11:07:10 PDT 2012


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

             Bug #: 13447
           Summary: false positive with exceptions: 'Undefined or garbage
                    value returned to caller'
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: jepler at dsndata.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The following small program has a false positive in scan-build:

File:    arg2.cc
Location:    line 10, column 12
Description:    The left operand of '+' is a garbage value

void f(int &v) {
    // original code has one arm that assigns v and one arm that throws
    throw true;
}

int y() {
    int i;
    f(i);
    return i;
}

Tested with clang r160634 (trunk from 2012-07-23) on 64-bit Ubuntu 8.04.

-- 
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