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

Clang code model does not mask code in failed #if-condition

XMLWordPrintable

      1. Look at the following code with Creator's built-in code mode:
        #include <iostream>
        
        using namespace std;
        
        int main()
        {
        #if 0
            cout << "Hello World!" << endl;
        #endif
            return 0;
        }
        

        The output will be masked with a gray background because it won't be compiled.

      2. Try the same with the Clang code model.
        No gray background there.

      The Clang code model should mask this code, too.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes