[LLVMbugs] [Bug 21983] New: Add Clang warning to suggest merge of variable declaration and initialization

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Dec 19 09:56:01 PST 2014


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

            Bug ID: 21983
           Summary: Add Clang warning to suggest merge of variable
                    declaration and initialization
           Product: new-bugs
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: eugene.zelenko at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Hi!

I think will be good idea to introduce warning which will suggest merge of
variable declaration and initialization for situation like:

int x;

<other variables declarations>

x = 0;

<function code>

Of course dependencies between variables initialization and necessary
reordering could be proposed for cases like:

int x;
struct data_t* Data;

Data = (struct data_t*) ...;
x = Data->x;

Eugene.

-- 
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/20141219/7a0766d9/attachment.html>


More information about the llvm-bugs mailing list