summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-21 22:36:40 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-21 22:36:40 +0000
commit8d4de67e1d88750ff48392c9b6bd83dce76c785e (patch)
tree2c9bf7dd252bd3ccc891ac554469c2d8ba1aa966 /clang/lib/AST/ASTContext.cpp
parent8e7ebea0b9918a8e8ee2b9a47963877e997a52fb (diff)
downloadbcm5719-llvm-8d4de67e1d88750ff48392c9b6bd83dce76c785e.tar.gz
bcm5719-llvm-8d4de67e1d88750ff48392c9b6bd83dce76c785e.zip
Implement parsing for message sends in Objective-C++. Message sends in
Objective-C++ have a more complex grammar than in Objective-C (surprise!), because (1) The receiver of an instance message can be a qualified name such as ::I or identity<I>::type. (2) Expressions in C++ can start with a type. The receiver grammar isn't actually ambiguous; it just takes a bit of work to parse past the type before deciding whether we have a type or expression. We do this in two places within the grammar: once for message sends and once when we're determining whether a []'d clause in an initializer list is a message send or a C99 designated initializer. This implementation of Objective-C++ message sends contains one known extension beyond GCC's implementation, which is to permit a typename-specifier as the receiver type for a class message, e.g., [typename compute_receiver_type<T>::type method]; Note that the same effect can be achieved in GCC by way of a typedef, e.g., typedef typename computed_receiver_type<T>::type Computed; [Computed method]; so this is merely a convenience. Note also that message sends still cannot involve dependent types or values. llvm-svn: 102031
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud