<html>
    <head>
      <base href="https://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 --- - compile error: reference to ‘Module’ is ambiguous"
   href="https://llvm.org/bugs/show_bug.cgi?id=27417">27417</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>compile error: reference to ‘Module’ is ambiguous
          </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>libclang
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I am on Ubuntu 14.04, g++/gcc 4.9.3. It was able to compile before, it doesn't
compile anymore after pulling the new changes with svn update.

How to duplicate the error: basically follow
<a href="http://llvm.org/docs/GettingStarted.html">http://llvm.org/docs/GettingStarted.html</a>, negate all optional,
-DCMAKE_BUILD_TYPE=Release, after "make" the below error shows up

[ 91%] Building CXX object
tools/clang/tools/extra/modularize/CMakeFiles/modularize.dir/ModularizeUtilities.cpp.o
/home/jason/llvm/tools/clang/tools/extra/modularize/ModularizeUtilities.cpp:337:54:
error: reference to ‘Module’ is ambiguous
 bool ModularizeUtilities::collectModuleHeaders(const Module &Mod) {
                                                      ^
In file included from
/home/jason/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h:20:0,
                 from
/home/jason/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h:17,
                 from
/home/jason/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h:17,
                 from
/home/jason/llvm/tools/clang/tools/extra/modularize/ModularizeUtilities.cpp:18:
/home/jason/llvm/include/llvm/Target/TargetOptions.h:24:9: note: candidates
are: class llvm::Module
   class Module;
         ^
In file included from
/home/jason/llvm/tools/clang/include/clang/Lex/ModuleLoader.h:17:0,
                 from
/home/jason/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h:19,
                 from
/home/jason/llvm/tools/clang/tools/extra/modularize/ModularizeUtilities.cpp:18:
/home/jason/llvm/tools/clang/include/clang/Basic/Module.h:47:7: note:          
      class clang::Module
 class Module {
       ^
/home/jason/llvm/tools/clang/tools/extra/modularize/ModularizeUtilities.cpp:337:54:
error: ‘Module’ does not name a type
 bool ModularizeUtilities::collectModuleHeaders(const Module &Mod) {
                                                      ^
/home/jason/llvm/tools/clang/tools/extra/modularize/ModularizeUtilities.cpp:337:6:
error: prototype for ‘bool
Modularize::ModularizeUtilities::collectModuleHeaders(const int&)’ does not
match any in class ‘Modularize::ModularizeUtilities’
 bool ModularizeUtilities::collectModuleHeaders(const Module &Mod) {
      ^
In file included from
/home/jason/llvm/tools/clang/tools/extra/modularize/ModularizeUtilities.cpp:26:0:
/home/jason/llvm/tools/clang/tools/extra/modularize/ModularizeUtilities.h:162:8:
error: candidate is: bool
Modularize::ModularizeUtilities::collectModuleHeaders(const clang::Module&)
   bool collectModuleHeaders(const clang::Module &Mod);
        ^
make[2]: ***
[tools/clang/tools/extra/modularize/CMakeFiles/modularize.dir/ModularizeUtilities.cpp.o]
Error 1
make[1]: *** [tools/clang/tools/extra/modularize/CMakeFiles/modularize.dir/all]
Error 2
make: *** [all] Error 2
</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>