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

Clang Formating of variables works unexpectedly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 4.7.0-beta2
    • C/C++/Obj-C++ Support
    • None
    • Windows
    • Windows

    Description

      Clang Formating of variables works unexpectedly, highlighting similar uses of variable with different colors

      void test() {
        QString s;
      
        #define m1(x)  #x
        #define m2(x)  m1(x)
      
        QString s1(s);
        QString s2(m1(s));
        QString s3(m2(s));
      }
      

      is highlighted as

      but everything is as expected if clang plugin is turned off

       

       

      Attachments

        1. Screenshot_1.png
          Screenshot_1.png
          14 kB
        2. Screenshot_2.png
          Screenshot_2.png
          11 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            progrev Prav Ogrev
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes