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'"

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 27 Aug 2020, 06:54 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!

    J 1 Reply Last reply 27 Aug 2020, 07:09
    0
    • J jsulm
      27 Aug 2020, 09:28

      @TBRZ Try later then

      T Offline
      T Offline
      TBRZ
      wrote on 27 Aug 2020, 11:38 last edited by
      #7

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

      1 Reply Last reply
      1
      • T TBRZ
        27 Aug 2020, 06:54

        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!

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 27 Aug 2020, 07:09 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 27 Aug 2020, 07:46
        0
        • J jsulm
          27 Aug 2020, 07:09

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

          T Offline
          T Offline
          TBRZ
          wrote on 27 Aug 2020, 07:46 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.

          J S 2 Replies Last reply 27 Aug 2020, 07:56
          0
          • T TBRZ
            27 Aug 2020, 07:46

            @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.

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 27 Aug 2020, 07:56 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 27 Aug 2020, 09:08
            0
            • J jsulm
              27 Aug 2020, 07:56

              @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 27 Aug 2020, 09:08 last edited by
              #5

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

              J 1 Reply Last reply 27 Aug 2020, 09:28
              0
              • T TBRZ
                27 Aug 2020, 09:08

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

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 27 Aug 2020, 09:28 last edited by
                #6

                @TBRZ Try later then

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

                T 1 Reply Last reply 27 Aug 2020, 11:38
                0
                • J jsulm
                  27 Aug 2020, 09:28

                  @TBRZ Try later then

                  T Offline
                  T Offline
                  TBRZ
                  wrote on 27 Aug 2020, 11:38 last edited by
                  #7

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

                  1 Reply Last reply
                  1
                  • T TBRZ
                    27 Aug 2020, 07:46

                    @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.

                    S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 27 Aug 2020, 18:28 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 27 Aug 2020, 21:57
                    0
                    • S SGaist
                      27 Aug 2020, 18:28

                      @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 27 Aug 2020, 21:57 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.

                      J 1 Reply Last reply 28 Aug 2020, 04:52
                      0
                      • T TBRZ
                        27 Aug 2020, 21:57

                        @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.

                        J Offline
                        J Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on 28 Aug 2020, 04:52 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

                        4/10

                        27 Aug 2020, 07:56

                        • Login

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