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

Clang: Autocompletion adds invalid code instead of std::endl

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • Qt Creator 3.6.0
    • Qt Creator 3.1.0-rc1
    • C/C++/Obj-C++ Support
    • Windows 7 64 bit
      Ubuntu 13.10

    Description

      1. Enable the clang code model.
      2. In a source file, include iostream:
        #include <iostream>
        
      3. Type the following beginning of a line:
        std::cout << std::en
        
      4. Press Alt-Space.
        Two possible autocompletions are being shown.
      5. Select "endl" and press Enter.
        The line will be completed to:
        std::cout << std::endl()
        

        This is not even syntactically correct. The code can't be compiled.

      The line should be completed to:

      std::cout << std::endl
      

      With Creator's built-in code model, this works correctly.

      Attachments

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

        Activity

          People

            bubke Marco Bubke
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes