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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to