[llvm-bugs] [Bug 31650] New: Definition of llvm::None is incorrect
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Sun Jan 15 20:54:04 PST 2017
    
    
  
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: unassignedbugs at nondot.org
          Reporter: zeratul976 at hotmail.com
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170116/74b17fa2/attachment.html>
    
    
More information about the llvm-bugs
mailing list