<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - error merging operator== from different modules"
   href="http://llvm.org/bugs/show_bug.cgi?id=20786">20786</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>error merging operator== from different modules
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Modules
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>biancacristinacristescu@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat module_TreePlayer.map 
module libMathCore {
  header "TMath.h"
  header "TVirtualFitter.h"  
}

module libHist { 
  header "TFormula.h"
  header "TFractionFitter.h"
}

module libTreePlayer {
  header "TBranchProxy.h"
  header "TTreeFormula.h"
}
--------------------------------------------------------------------------------
$ cat TMath.h
#include "random.h"
--------------------------------------------------------------------------------
$ cat TVirtualFitter.h //yes, empty

--------------------------------------------------------------------------------
$ cat TFormula.h 
class TFormula  {};
--------------------------------------------------------------------------------
 $ cat TFractionFitter.h 
# include "TVirtualFitter.h"
--------------------------------------------------------------------------------
$ cat TBranchProxy.h 
#include "random.h"
--------------------------------------------------------------------------------
$ cat TTreeFormula.h 
#include "TFormula.h"
class TTreeFormula : public TFormula {};
--------------------------------------------------------------------------------
$ cat random.h 
namespace std 
{
  template<typename _UIntType, unsigned int __w,
       unsigned int __n, unsigned int __m, unsigned int __r,
       _UIntType __a, unsigned int __u, _UIntType __d, unsigned int __s,
       _UIntType __b, unsigned int __t,
       _UIntType __c, unsigned int __l, _UIntType __f>
    class mersenne_twister_engine
    {
    public:

      friend bool
      operator==(const mersenne_twister_engine& __lhs,
         const mersenne_twister_engine& __rhs)
      { return 0; }

    };

  typedef mersenne_twister_engine<
    unsigned int,
    32, 624, 397, 31,
    0x9908b0dfUL, 11,
    0xffffffffUL, 7,
    0x9d2c5680UL, 15,
    0xefc60000UL, 18, 1812433253UL> mt19937;


  class random_device
  {
      mt19937      _M_mt;
  };
} // namespace std
--------------------------------------------------------------------------------

Command run and error generated is:
"/usr/inst-deb-clang/bin/clang" -cc1 -triple x86_64-unknown-linux-gnu -E
-disable-free -mrelocation-model static -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -target-linker-version 2.24 -v -dwarf-column-info
-resource-dir /usr/inst-deb-clang/bin/../lib/clang/3.6.0 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
-internal-isystem /usr/local/include -internal-isystem
/usr/inst-deb-clang/bin/../lib/clang/3.6.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /home/cristina/clang-bugs/clang-tiered-pcm-reproducer
-ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -x c++
-fcolor-diagnostics -x c++ -std=c++11
-I/home/cristina/root/objClangBugs/include   -fmodules
-fno-modules-global-index -fdisable-module-hash -fmodule-maps -emit-module
/home/cristina/root/objClangBugs/include/module_TreePlayer.map
-fmodules-cache-path=/home/cristina/clang-bugs/clang-tiered-pcm-reproducer/pcm
-fmodule-name=libTreePlayer
clang -cc1 version 3.6.0 based upon LLVM 3.6.0svn default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/x86_64-linux-gnu"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/cristina/root/objClangBugs/include
 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8
 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
 /usr/local/include
 /usr/inst-deb-clang/bin/../lib/clang/3.6.0/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
clang -cc1 version 3.6.0 based upon LLVM 3.6.0svn default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/x86_64-linux-gnu"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/cristina/root/objClangBugs/include
 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8
 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
 /usr/local/include
 /usr/inst-deb-clang/bin/../lib/clang/3.6.0/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
clang -cc1 version 3.6.0 based upon LLVM 3.6.0svn default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/x86_64-linux-gnu"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/cristina/root/objClangBugs/include
 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8
 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
 /usr/local/include
 /usr/inst-deb-clang/bin/../lib/clang/3.6.0/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
In module 'libHist' imported from
/home/cristina/root/objClangBugs/include/TTreeFormula.h:1:
In module 'libMathCore' imported from
/home/cristina/root/objClangBugs/include/TFractionFitter.h:1:
/home/cristina/root/objClangBugs/include/random.h:13:7: error:
'std::operator==' from module 'libMathCore' is not present in definition of
namespace 'std' in module 'libMathCore'
      operator==(const mersenne_twister_engine& __lhs,
      ^
/home/cristina/root/objClangBugs/include/random.h:1:11: note: definition has no
member 'operator=='
namespace std 
          ^
1 error generated.
-------------------------------------------------------------------------------

I have seen this error in more than this case.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>