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

Clang Code Model adds wrong code completion: std::cout>

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • Qt Creator 3.6.0
    • C/C++/Obj-C++ Support
    • None
    • Windows 7 64 bit

    Description

      1. Enable the clang code model.
      2. Open a simple C++ file:
        #include <iostream>
        
        int main(int argc, char *argv[])
        {
            std::cou
        }
        
      3. Place the cursor behind "cou" and press Ctrl+Space.
        It will be completed to "cout". This is correct.
      4. Undo this change.
      5. Remove a couple of characters from the #include line and press Ctrl+Space.
        It will be completed to #include <iostream>. This is correct.
      6. Repeat step 3.
        It will be completed to "cout>". This is wrong. If it doesn't happen at first time, repeat it a couple of times.

      Code completion should always add correct code. With Creator's built-in code model, this works correctly.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-15483
          # Subject Branch Project Status CR V

          Activity

            People

              kosjar Nikolai Kosjar
              rlohning Robert Löhning
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes