[LLVMbugs] [Bug 11927] New: warn on uninitialized value passed by const reference
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Sun Feb  5 08:48:26 PST 2012
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=11927
             Bug #: 11927
           Summary: warn on uninitialized value passed by const reference
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: benny.kra at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified
int ref(const int&);
void test1() {
  int x;
  ref(x);
}
I think clang should warn about passing x uninitialized by const reference
here. "ref" can modify the value by casting the const away, but that's not
really something worth encouraging.
-- 
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