<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - LegalizationArtifactCombiner.h contains: "using namespace llvm::MIPatternMatch;" in the root namespace"
   href="https://bugs.llvm.org/show_bug.cgi?id=41189">41189</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LegalizationArtifactCombiner.h contains: "using namespace llvm::MIPatternMatch;" in the root namespace
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>8.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>bique.alexandre@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi,

I wonder if having "using namespace" in the root namespace is safe. Probably
not.

I think it is responsible for a conflict between OSX's TimeRecord and the one
in LLVM:


/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/MacTypes.h:604:16:
error: reference to 'TimeRecord' is ambiguous
typedef struct TimeRecord               TimeRecord;
               ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/MacTypes.h:599:8:
note: candidate found by name lookup is 'TimeRecord'
struct TimeRecord {
       ^
In file included from
/Users/buildbot/jenkins/workspace/bw-studio-osx-release/float/app/nitro/src/main/cpp/Jit.cpp:11:
In file included from ../../app/nitro/src/main/include/nitro/LLVM.h:34:
In file included from
../../../target/dependencies/include/llvm/Passes/StandardInstrumentations.h:21:
In file included from
../../../target/dependencies/include/llvm/IR/PassTimingInfo.h:23:
../../../target/dependencies/include/llvm/Support/Timer.h:27:7: note: candidate
found by name lookup is 'llvm::TimeRecord'
class TimeRecord {
      ^</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>