]> granicus.if.org Git - clang/commit
Teach __builtin_offsetof to compute the offsets of members of base
authorDouglas Gregor <dgregor@apple.com>
Thu, 29 Apr 2010 00:18:15 +0000 (00:18 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 29 Apr 2010 00:18:15 +0000 (00:18 +0000)
commitcc8a5d5f90bbbbcb46f342117b851b7e07ec34f1
treea75f28ed6bd4b72e7830bdd531451f25fc68159c
parent6e45cbcba1807c01ce2fc9a768ebfffafcffa22d
Teach __builtin_offsetof to compute the offsets of members of base
classes, since we only warn (not error) on offsetof() for non-POD
types. We store the base path within the OffsetOfExpr itself, then
evaluate the offsets within the constant evaluator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102571 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Expr.h
lib/AST/ExprConstant.cpp
lib/AST/StmtPrinter.cpp
lib/AST/StmtProfile.cpp
lib/Frontend/PCHReaderStmt.cpp
lib/Frontend/PCHWriterStmt.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/TreeTransform.h
test/SemaCXX/offsetof.cpp