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

Auto full formatting produces corrupted code when clang-format is configured to put const after type

    XMLWordPrintable

Details

    • Linux/Wayland

    Description

      When .clang-format contains

      QualifierAlignment: Custom
      QualifierOrder: ['inline', 'static', 'type', 'const', 'volatile' ]
      

      Qt Creator is set to use Full Formatting, and function parameter contains '::', e.g, void f( std::string const & s ), invoking "Add Definition..." results in:

      void ClassName::f( std::stringconst&s) 
       {
      //	 QTC_TEMP	
      

      Attachments

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

        Activity

          People

            davschul David Schulz
            eugeneshalygin Eugene Shalygin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes