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

"follow symbol under cursor" for __has_include has unexpected navigation target

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 18.0.0-beta1 (18.0 branch)
    • C/C++/Obj-C++ Support
    • None
    • Linux/Wayland

      compare this snippet from qtmultimedia:

      #if __has_include(<spa/param/audio/raw-utils.h>)
      #  include <spa/param/audio/raw-utils.h>
      #else
      #  include "qpipewire_spa_compat_p.h"
      #endif
      

      "follow symbol under cursor" behaviour:

      • _has_include will navigate to "# define Q_DECL_EXPORT_OVERRIDABLE __attribute_((visibility("default"), weak))"
      • any of the path components in the header path will navigate to a source file with a member variable of that path component. e.g. "raw" will navigate to /usr/include/spa-0.2/spa/param/video/format.h, which has a struct spa_video_info with a union member "raw"

      expected behaviour:

      • __has_include should not navigate anywhere
      • the path in __has_include should navigate to the file (if it exists)

        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