[llvm-bugs] [Bug 41189] New: LegalizationArtifactCombiner.h contains: "using namespace llvm::MIPatternMatch; " in the root namespace

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 21 15:41:44 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41189

            Bug ID: 41189
           Summary: LegalizationArtifactCombiner.h contains: "using
                    namespace llvm::MIPatternMatch;" in the root namespace
           Product: new-bugs
           Version: 8.0
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: bique.alexandre at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

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 {
      ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190321/2b1ebde9/attachment.html>


More information about the llvm-bugs mailing list