diff options
author | John McCall <rjmccall@apple.com> | 2011-10-25 07:27:56 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-10-25 07:27:56 +0000 |
commit | a1b852f8e1bee5ed3604ee483803cef39ce57a20 (patch) | |
tree | a660a7efb932f3eab03275702a554a2adcca90ec /include/clang/AST/BuiltinTypes.def | |
parent | e88c4513157cc551ed8080b1e3b3b875a9a570e1 (diff) |
Introduce a placeholder type for "pseudo object"
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.
Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/BuiltinTypes.def')
-rw-r--r-- | include/clang/AST/BuiltinTypes.def | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/clang/AST/BuiltinTypes.def b/include/clang/AST/BuiltinTypes.def index 067862c1c1..bfcd55bedb 100644 --- a/include/clang/AST/BuiltinTypes.def +++ b/include/clang/AST/BuiltinTypes.def @@ -179,6 +179,24 @@ PLACEHOLDER_TYPE(Overload, OverloadTy) // x->foo # if only contains non-static members PLACEHOLDER_TYPE(BoundMember, BoundMemberTy) +// The type of an expression which refers to a pseudo-object, +// such as those introduced by Objective C's @property or +// VS.NET's __property declarations. A placeholder type. The +// pseudo-object is actually accessed by emitting a call to +// some sort of function or method; typically there is a pair +// of a setter and a getter, with the setter used if the +// pseudo-object reference is used syntactically as the +// left-hand-side of an assignment operator. +// +// A pseudo-object reference naming an Objective-C @property is +// always a dot access with a base of object-pointer type, +// e.g. 'x.foo'. +// +// In VS.NET, a __property declaration creates an implicit +// member with an associated name, which can then be named +// in any of the normal ways an ordinary member could be. +PLACEHOLDER_TYPE(PseudoObject, PseudoObjectTy) + // __builtin_any_type. A placeholder type. Useful for clients // like debuggers that don't know what type to give something. // Only a small number of operations are valid on expressions of |