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

generic project: only first line from cxxflags file is forwarded to clang code model

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • Qt Creator 4.9.0
    • C/C++/Obj-C++ Support
    • None
    • Windows

    Description

      I'm using qtcreator only as a code editor ("generic project") with external build system, compiler set in the Kit is a MVCC 15.0 (and64).

      Contrary to the documentation (https://doc.qt.io/qtcreator/creator-project-generic.html#forwarding-flags-to-clang-code-model), all flags to the clang code model must be present in first line of the projects' cxxflags file. 

      For example, the following code:

       

      #include <tuple>
      namespace n::m {
      int foo() {
      int a = 1, b = 2;
      try { } catch (...) { }
      const auto& [x, y] = std::tie(a, b);
      return x+y;
      }
      } 
      

       

      Gets parsed correctly when projects' cxxflags file contains

      /std:c++17 /EHsc
      

      However, when those flags are in separate lines, only the first one is used, and CCM gives errors.

       

      Attachments

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

        Activity

          People

            kosjar Nikolai Kosjar
            connie Mateusz Brzeszcz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes