[LLVMbugs] [Bug 4673] New: Empty classes have positive DataSize
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Aug 2 13:38:40 PDT 2009
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: unassignedclangbugs at nondot.org
ReportedBy: rideau3 at gmail.com
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list