[LLVMbugs] [Bug 16890] New: Add a checker to detected unmodified variables

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 14 15:16:28 PDT 2013


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

            Bug ID: 16890
           Summary: Add a checker to detected unmodified variables
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: michael.morrell at intel.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I think if it would be nice if the following reported some kind of error:

  int foo()
  {
     int i = 0;

     return i;
  }

where a variable is never modified (to me, this indicates that some code that
modified the variable is missing).   If the variable is really not supposed to
change, the user can declare it as "const" (or use a #define).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130814/f44e2de1/attachment.html>


More information about the llvm-bugs mailing list