Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Fix for build error "member access into incomplete type 'const clang::FileEntry'"
QtWS25 Last Chance

Fix for build error "member access into incomplete type 'const clang::FileEntry'"

Scheduled Pinned Locked Moved Solved Installation and Deployment
build errorqtcreatorbuilding
10 Posts 3 Posters 12.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TBRZ
    wrote on last edited by
    #1

    The fix:

    diff --git a/src/tools/clangrefactoringbackend/source/sourcelocationsutils.h b/src/tools/clangrefactoringbackend/source/sourcelocationsutils.h
    index 45bc71f..6304523 100644
    --- a/src/tools/clangrefactoringbackend/source/sourcelocationsutils.h
    +++ b/src/tools/clangrefactoringbackend/source/sourcelocationsutils.h
    @@ -30,6 +30,7 @@
     #include <sourcerangescontainer.h>
     
     #include <clang/Basic/SourceManager.h>
    +#include <clang/Basic/FileManager.h>
     #include <clang/Lex/Lexer.h>
     #include <llvm/Support/FileSystem.h>
     #include <llvm/Support/FileUtilities.h>
    

    The error:

    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
    In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
    In file included from src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:28:
    src/tools/clangrefactoringbackend/source/sourcelocationsutils.h:90:76: error: member access into incomplete type 'const clang::FileEntry'
            auto filePath = FilePath::fromNativeFilePath(absolutePath(fileEntry->getName()));
                                                                               ^
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
    In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
    In file included from src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:28:
    In file included from src/tools/clangrefactoringbackend/source/sourcelocationsutils.h:32:
    In file included from include/clang/Basic/SourceManager.h:37:
    In file included from include/clang/Basic/Diagnostic.h:19:
    include/clang/Basic/SourceLocation.h:356:7: note: forward declaration of 'clang::FileEntry'
    class FileEntry;
          ^
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
    In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
    src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:66:36: error: member access into incomplete type 'const clang::FileEntry'
                uint fileId = fileEntry->getUID();
                                       ^
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
    In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
    In file included from src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:28:
    In file included from src/tools/clangrefactoringbackend/source/sourcelocationsutils.h:32:
    In file included from include/clang/Basic/SourceManager.h:37:
    In file included from include/clang/Basic/Diagnostic.h:19:
    include/clang/Basic/SourceLocation.h:356:7: note: forward declaration of 'clang::FileEntry'
    class FileEntry;
          ^
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
    In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
    src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:76:38: error: member access into incomplete type 'const clang::FileEntry'
                auto filePath = fileEntry->getName();
                                         ^
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
    In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
    In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
    In file included from src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:28:
    In file included from src/tools/clangrefactoringbackend/source/sourcelocationsutils.h:32:
    In file included from include/clang/Basic/SourceManager.h:37:
    In file included from include/clang/Basic/Diagnostic.h:19:
    include/clang/Basic/SourceLocation.h:356:7: note: forward declaration of 'clang::FileEntry'
    class FileEntry;
          ^
    3 errors generated.
    

    Cheers!

    jsulmJ 1 Reply Last reply
    0
    • jsulmJ jsulm

      @TBRZ Try later then

      T Offline
      T Offline
      TBRZ
      wrote on last edited by
      #7

      @jsulm https://bugreports.qt.io/browse/QTCREATORBUG-24537

      1 Reply Last reply
      1
      • T TBRZ

        The fix:

        diff --git a/src/tools/clangrefactoringbackend/source/sourcelocationsutils.h b/src/tools/clangrefactoringbackend/source/sourcelocationsutils.h
        index 45bc71f..6304523 100644
        --- a/src/tools/clangrefactoringbackend/source/sourcelocationsutils.h
        +++ b/src/tools/clangrefactoringbackend/source/sourcelocationsutils.h
        @@ -30,6 +30,7 @@
         #include <sourcerangescontainer.h>
         
         #include <clang/Basic/SourceManager.h>
        +#include <clang/Basic/FileManager.h>
         #include <clang/Lex/Lexer.h>
         #include <llvm/Support/FileSystem.h>
         #include <llvm/Support/FileUtilities.h>
        

        The error:

        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
        In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
        In file included from src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:28:
        src/tools/clangrefactoringbackend/source/sourcelocationsutils.h:90:76: error: member access into incomplete type 'const clang::FileEntry'
                auto filePath = FilePath::fromNativeFilePath(absolutePath(fileEntry->getName()));
                                                                                   ^
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
        In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
        In file included from src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:28:
        In file included from src/tools/clangrefactoringbackend/source/sourcelocationsutils.h:32:
        In file included from include/clang/Basic/SourceManager.h:37:
        In file included from include/clang/Basic/Diagnostic.h:19:
        include/clang/Basic/SourceLocation.h:356:7: note: forward declaration of 'clang::FileEntry'
        class FileEntry;
              ^
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
        In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
        src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:66:36: error: member access into incomplete type 'const clang::FileEntry'
                    uint fileId = fileEntry->getUID();
                                           ^
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
        In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
        In file included from src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:28:
        In file included from src/tools/clangrefactoringbackend/source/sourcelocationsutils.h:32:
        In file included from include/clang/Basic/SourceManager.h:37:
        In file included from include/clang/Basic/Diagnostic.h:19:
        include/clang/Basic/SourceLocation.h:356:7: note: forward declaration of 'clang::FileEntry'
        class FileEntry;
              ^
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
        In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
        src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:76:38: error: member access into incomplete type 'const clang::FileEntry'
                    auto filePath = fileEntry->getName();
                                             ^
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.cpp:26:
        In file included from src/tools/clangrefactoringbackend/source/collectsymbolsaction.h:29:
        In file included from src/tools/clangrefactoringbackend/source/indexdataconsumer.h:32:
        In file included from src/tools/clangrefactoringbackend/source/symbolsvisitorbase.h:28:
        In file included from src/tools/clangrefactoringbackend/source/sourcelocationsutils.h:32:
        In file included from include/clang/Basic/SourceManager.h:37:
        In file included from include/clang/Basic/Diagnostic.h:19:
        include/clang/Basic/SourceLocation.h:356:7: note: forward declaration of 'clang::FileEntry'
        class FileEntry;
              ^
        3 errors generated.
        

        Cheers!

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @TBRZ In src/tools/clangrefactoringbackend/source/sourcelocationsutils.h you need to include header file containing FileEntry

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        T 1 Reply Last reply
        0
        • jsulmJ jsulm

          @TBRZ In src/tools/clangrefactoringbackend/source/sourcelocationsutils.h you need to include header file containing FileEntry

          T Offline
          T Offline
          TBRZ
          wrote on last edited by
          #3

          @jsulm Hey, yes I'm aware of that. I didn't want to go through the pain of setting up accounts for such a minor diff.
          If possible please fix this in master.

          jsulmJ SGaistS 2 Replies Last reply
          0
          • T TBRZ

            @jsulm Hey, yes I'm aware of that. I didn't want to go through the pain of setting up accounts for such a minor diff.
            If possible please fix this in master.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @TBRZ said in Fix for build error "member access into incomplete type 'const clang::FileEntry'":

            If possible please fix this in master.

            Please create a bug ticket in Qt bug tracker.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            T 1 Reply Last reply
            0
            • jsulmJ jsulm

              @TBRZ said in Fix for build error "member access into incomplete type 'const clang::FileEntry'":

              If possible please fix this in master.

              Please create a bug ticket in Qt bug tracker.

              T Offline
              T Offline
              TBRZ
              wrote on last edited by
              #5

              @jsulm I get internal error, maintenance messages and connection hanging up etc, when I open http://bugreports.qt.io/

              jsulmJ 1 Reply Last reply
              0
              • T TBRZ

                @jsulm I get internal error, maintenance messages and connection hanging up etc, when I open http://bugreports.qt.io/

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #6

                @TBRZ Try later then

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                T 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @TBRZ Try later then

                  T Offline
                  T Offline
                  TBRZ
                  wrote on last edited by
                  #7

                  @jsulm https://bugreports.qt.io/browse/QTCREATORBUG-24537

                  1 Reply Last reply
                  1
                  • T TBRZ

                    @jsulm Hey, yes I'm aware of that. I didn't want to go through the pain of setting up accounts for such a minor diff.
                    If possible please fix this in master.

                    SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    @TBRZ said in Fix for build error "member access into incomplete type 'const clang::FileEntry'":

                    @jsulm Hey, yes I'm aware of that. I didn't want to go through the pain of setting up accounts for such a minor diff.
                    If possible please fix this in master.

                    You already have an account :-)
                    You just need to send your patch to Gerrit :-)

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    T 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      @TBRZ said in Fix for build error "member access into incomplete type 'const clang::FileEntry'":

                      @jsulm Hey, yes I'm aware of that. I didn't want to go through the pain of setting up accounts for such a minor diff.
                      If possible please fix this in master.

                      You already have an account :-)
                      You just need to send your patch to Gerrit :-)

                      T Offline
                      T Offline
                      TBRZ
                      wrote on last edited by
                      #9

                      @SGaist I appreciate the welcoming gesture. If I was not occupied with some deadlines, I'll definitely do so. But going through the wiki page for gerrit is daunting.

                      I came here for help about https://forum.qt.io/topic/118454/how-to-enable-clangrefactoring-and-clangpchmanager-plugin/1 and thought now that I'm here, I might as well notify the developers about a problem.

                      jsulmJ 1 Reply Last reply
                      0
                      • T TBRZ

                        @SGaist I appreciate the welcoming gesture. If I was not occupied with some deadlines, I'll definitely do so. But going through the wiki page for gerrit is daunting.

                        I came here for help about https://forum.qt.io/topic/118454/how-to-enable-clangrefactoring-and-clangpchmanager-plugin/1 and thought now that I'm here, I might as well notify the developers about a problem.

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #10

                        @TBRZ said in Fix for build error "member access into incomplete type 'const clang::FileEntry'":

                        notify the developers about a problem

                        This is user forum. If you want to communicate with developers you should either use bug tracker or the mailing list.

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved