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

Clang: File with BOM leads to: expected "FILENAME" or <FILENAME>

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • Qt Creator 3.6.0-beta1
    • C/C++/Obj-C++ Support

    Description

      libclang has problems to process files with BOM:

      1. Create and open a file like foo.cpp below.
      2. A diagnostic fatal error: 'someNonExistingFile.h' file not found will be indicated, as expected.
      3. From the context menu of the editor, choose "Add UTF-8 BOM on Save", then insert a space and hit Ctrl+S to save with the BOM.
      4. Close and re-open the file. The diagnostic error: expected "FILENAME" or <FILENAME> (Lexical or Preprocessor Issue) will be indicated.
      5. Insert some space --> this diagnostic is gone and the correct one from Step 2 is displayed again.
      foo.cpp
      #include <someNonExistingFile.h.h>
      
      int main() { return 0; }
      

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes