http://llvm.org/bugs/show_bug.cgi?id=4673

           Summary: Empty classes have positive DataSize
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: AST
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


While implementing the __is_empty type trait, I chose to use the DataSize
member of ASTRecordLayout. As it turns out, a completely empty class ("struct
foo {};") has a DataSize equal to its Size. If the class contains a
constructor, destructor, or copy assignment operator, DataSize is 0 as
expected. Other member functions do not seem to affect this. Those three
functions are the definition of a trivial class - is that the issue?


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to