// pointer size.
return getTypeInfo(cast<ReferenceType>(T)->getPointeeType());
case Type::MemberPointer: {
- // Note that this is not only platform- but also ABI-dependent. We follow
+ // FIXME: This is not only platform- but also ABI-dependent. We follow
// the GCC ABI, where pointers to data are one pointer large, pointers to
// functions two pointers. But if we want to support ABI compatibility with
- // other compilers too, we need to delegate this completely to TargetInfo.
+ // other compilers too, we need to delegate this completely to TargetInfo
+ // or some ABI abstraction layer.
QualType Pointee = cast<MemberPointerType>(T)->getPointeeType();
unsigned AS = Pointee.getAddressSpace();
Width = Target.getPointerWidth(AS);
// correctly.
if (const PointerLikeType *PT = getAsPointerLikeType())
return PT->getPointeeType()->isVariablyModifiedType();
+ if (const MemberPointerType *PT = getAsMemberPointerType())
+ return PT->getPointeeType()->isVariablyModifiedType();
// A function can return a variably modified type
// This one isn't completely obvious, but it follows from the
/// '*' cv-qualifier-seq[opt]
/// '&'
/// [C++0x] '&&' [TODO]
-/// '::'[opt] nested-name-specifier '*' cv-qualifier-seq[opt] [TODO]
+/// '::'[opt] nested-name-specifier '*' cv-qualifier-seq[opt]
///
/// cv-qualifier-seq:
/// cv-qualifier cv-qualifier-seq[opt]
// ptr-operator declarator
while (1) {
- if (Tok.is(tok::star) || Tok.is(tok::amp) ||
- (Tok.is(tok::caret) && getLang().Blocks)) {
+ if (Tok.is(tok::coloncolon) || Tok.is(tok::identifier))
+ TryAnnotateCXXScopeToken();
+
+ if (Tok.is(tok::star) || Tok.is(tok::amp) ||
+ (Tok.is(tok::caret) && getLang().Blocks) ||
+ (Tok.is(tok::annot_cxxscope) && NextToken().is(tok::star))) {
// ptr-operator
ConsumeToken();
while (Tok.is(tok::kw_const) ||
int C::*pci; // expected-error {{'pci' does not point into a class}}
void A::*pdv; // expected-error {{'pdv' declared as a member pointer to void}}
int& A::*pdr; // expected-error {{'pdr' declared as a pointer to a reference}}
+
+void f() {
+ // This requires tentative parsing.
+ int (A::*pf)(int, int);
+}