Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-23967

When hover on sizeof keyword show size in bytes.

    XMLWordPrintable

Details

    • 949bb0e67bbf6e7d8208dad9876382ef8ce5eb59 (qt-creator/qt-creator/master)

    Description

      Alot of bugs are due to sizeof misuse. for ex. if intention is to get size of struct, but missing & character(when variable is pointer of the struct), then sizeof will return pointer size instead.

      A way to try to minimize those bugs is qtcreator to have feature that will calculate(get info from clang parser) evaluated size in bytes and show them in tooltip. 

       

      For ex:

      Now when I hover over 'sizeof(int) it shows 'Unsigned long (with F1 icon)'

      and it can be improved with: 'Unsigned long(evaluated size is 4 bytes) (with F1 icon)'

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            boris.barbulovski Boris Barbulovski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes