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

           Summary: Clang should warn on use of a local variable in its
                    own initializer
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


-Wuninitialized should complain about this:
void f() {
  int i = i;
}

A more realistic example of how this could happen:
void f(int* encoded_result) {
 // Note the typo below, it should be
 // bool encode_result = (encoded_result != NULL);
 bool encode_result = (encode_result != NULL);
 if (encode_result) *encoded_result = 42;
}

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