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

Add more fixits for compiler errors where a solution is already known

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • Qt Creator 13.0.0
    • C/C++/Obj-C++ Support
    • None
    • All

    Description

      Consider the following C code:

      #include <string.h>
      
      static char GlobalVariable[64];
      
      int main()
      {
          strcpy(GlabalVariable, "Hello World");
          strcpy(GlobalVariable, "Hello World";
          return 0;
      }
      

      For the first errornous line we get a fixit (light bulb) to rename the variable:

      main.c:7:12: Use of undeclared identifier 'GlabalVariable'; did you mean 'GlobalVariable'? (fix available)
      main.c:3:13: 'GlobalVariable' declared here
      

      but for the second there is only a Clangd error that says a closing brace is missing at column 41:

      main.c:8:41: Expected ')'
      main.c:8:11: to match this '('
      

      It would be cool to have fixits for the second kind of errors too.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            aha_1980 André Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes