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

            Bug ID: 31650
           Summary: Definition of llvm::None is incorrect
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
          Assignee: unassignedb...@nondot.org
          Reporter: zeratul...@hotmail.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

In include/llvm/ADT/None.h, llvm::None is defined as follows:

namespace llvm {
  enum class NoneType { None };
  const NoneType None = None;
}

Clearly the intention is for the initializer to name the enumerator 'None', but
it actually names the variable 'None', which means the resulting of value of
the variable 'None' is unspecified (rather than the intended NoneType::None).

The definition should instead be:

namespace llvm {
  enum class NoneType { None };
  const NoneType None = NoneType::None;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to