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

Parser cannot handle multi-line comments in C macros

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • Qt Creator 2.5.0
    • C/C++/Obj-C++ Support
    • None
    • Linux 64 bit, Ubuntu 12.04.

    Description

      If there's a multi-line comment in a C/C++ macro, QT Creator shows an error at the line immediately after the comment ends.

      As an example, I have attached screenshots of c.h file from the open-source PostgreSQL project's source code.

      macro-multi-line-comment-error.png shows the error, and the tooltip on the first error says: "expected a declaration".

      macro-no-multi-line-comment-no-error-.png shows that if I delete that multi-line comment, the error goes away.

      macro-single-line-comment-no-error-.png shows that if I convert that multi-line comment into a single-line comment, then also the error goes away.

      Attachments

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

        Activity

          People

            leamelo Leandro T. C. Melo
            singh.gurjeet Gurjeet Singh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes