Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-7047

LLVM: friend access to IntrusiveRefCntPtr<X> to access 'Obj'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 6.02/04
    • Fix Version/s: 6.04.00
    • Component/s: None
    • Labels:
      None
    • Environment:

      (GCC) 5.0.0 20150126

    • Development:

      Description

      GCC 5.0 is more strict with template function defined inside class:

      In file included from root/interpreter/llvm/src/tools/clang/lib/Frontend/../../include/clang/Basic/TargetInfo.h:24:0,
      from root/interpreter/llvm/src/tools/clang/lib/Frontend/ChainedIncludesSource.cpp:15:
      root/interpreter/llvm/src/include/llvm/ADT/IntrusiveRefCntPtr.h: In instantiation of 'llvm::IntrusiveRefCntPtr<T>::IntrusiveRefCntPtr(llvm::IntrusiveRefCntPtr<X>&&) [with X
      =

      {anonymous}::ChainedIncludesSource; T = clang::ExternalSemaSource]':
      root/interpreter/llvm/src/tools/clang/lib/Frontend/ChainedIncludesSource.cpp:211:10: required from here
      root/interpreter/llvm/src/include/llvm/ADT/IntrusiveRefCntPtr.h:137:8: error: '{anonymous}

      ::ChainedIncludesSource* llvm::IntrusiveRefCntPtr<

      {anonymous}

      ::ChainedIncludesSourc
      e>::Obj' is private
      T* Obj;
      ^
      root/interpreter/llvm/src/include/llvm/ADT/IntrusiveRefCntPtr.h:158:13: error: within this context
      S.Obj = 0;

      The attached patch (taken from LLVM upstream) solves the problem. Alternatively, the whole LLVM can be upgraded from the upstream.

        Attachments

          Activity

            People

            • Assignee:
              axel Axel Naumann
              Reporter:
              63771d6337c502f6fb8c Alexander Klimov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: