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

Incorrect header parsing with clang code model enabled

    XMLWordPrintable

Details

    Description

      Simple qbs project (see attached files), clang code model enabled. Namespace declaration in header files in underlined with red, hovering a cursor on it shows "unknown type name 'namespace'". Running Creator as "LANG=en_US.UTF-8 QTC_CLANG_VERBOSE=1 ./qtcreator.sh" gives the following errors:

      error: invalid argument '-std=gnu89' not allowed with 'C+/ObjC+'
      /home/mbalabin/qbs-test-project/foo.h:1:1: error: unknown type name 'namespace'
      /home/mbalabin/qbs-test-project/foo.h:1:14: error: expected ';' after top level declarator

      Complete log is attached as a file.

      Attachments

        1. parse_log.txt
          13 kB
          Mikhail Balabin
        2. qbs-test-project.tar.bz2
          35 kB
          Mikhail Balabin

        Issue Links

          Activity

            People

              kosjar Nikolai Kosjar
              mbalabin Mikhail Balabin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: