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

clangd: objective-c headers not parsed as objective-c

XMLWordPrintable

    • macOS
    • c1e43250b (16.0)

      it is a bit cumbersome to work with objective-c headers in qtcreator, as headers are not detected as objective-c files and even if the LANGUAGE property is set and therefore the code model does not work (i.e. detects lots of "errors')

      compare attached project:

      • foo.h includes <Foundation/Foundation.h>, which is not parsed as objective-c(pp), so there are errors
      • foo.mm is parsed as objective-cpp

      ideally the file would be parsed as objective-c(pp) under two conditions:

      • if the LANGUAGE property is set to OBJC(XX)
      • if the header is included in an objective-c(pp) source file: some headers seem to have different parse contexts if they are used in different targets, maybe something similar could be done for objective-c(pp) as well ...

        1. Archive.zip
          1 kB
          tim blechmann
        2. Screenshot 2024-12-26 at 10.46.51 PM.png
          98 kB
          tim blechmann
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cadam Cristian Adam
            timblechmann tim blechmann
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes