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

improve parse context for objective-c(xx) headers

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • C/C++/Obj-C++ Support
    • None
    • macOS

      when opening an objective-c header in a mixed c+/objc codebase, it is typically opened in a c+ parse context, showing lots of warnings when using objectiv-c in the header. i wonder if the quality of life could be improved.

      compare attached project:

      • foo.h is included by foo.mm
      • bar.h is included by main.cpp

      both foo.h and bar.h list both CXX and OBJCXX contexts, but default to CXX. i wonder if it is possible to improve the quality of life by detecting the contexts where the files are included in. e.g. if a header is included in any OBJCXX source file, it could have a default parse context of OBJCXX. or alternatively maybe: if there is a parse error in the CXX context and the target has an OBJCXX context, it could switch to OBJCXX. not sure if there are any fundamental problems with this kind of heuristics, though

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

            kandeler Christian Kandeler
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes