]> granicus.if.org Git - clang/commit
In ARC mode, consider Objective-C lifetime types (object pointers and
authorDouglas Gregor <dgregor@apple.com>
Tue, 12 Jul 2011 17:28:52 +0000 (17:28 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 12 Jul 2011 17:28:52 +0000 (17:28 +0000)
commitf96e904783dc28b2b3fa4dcbb6dbdb40ca26aa8d
tree4e5899392f7d0e320953b5306e0972c1703d9e32
parent98a5403ecf1d2b60ae8cbf43e54194bd762cacaa
In ARC mode, consider Objective-C lifetime types (object pointers and
block pointers) that don't have any qualification to be POD types. We
were previously considering them to be non-POD types, because this was
convenient in C++ for is_pod-like traits. However, we now end up
inferring lifetime in such cases (template arguments infer __strong),
so it is not necessary.

Moreover, we want rvalues of object type (which have their lifetime
stripped) to be PODs to allow, e.g., va_arg(arglist, id) to function
properly. Fixes <rdar://problem/9758798>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134993 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Type.cpp
test/ARCMT/cxx-checking.mm
test/CodeGenObjC/arc.m
test/SemaObjC/arc.m
test/SemaObjCXX/arc-non-pod.mm