diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-03 20:53:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-03 20:53:48 +0000 |
commit | 1e40caa95e217507909d96d933e55cf37cbad266 (patch) | |
tree | c6b9d80dc1a34fa703e9e8b7dd55b1fbd8888428 | |
parent | 6f26920dfa5020202016b18f52ccd120d9c7e518 (diff) |
Remove a bunch of #if 0'd code made irrelevant by the latest ParseUnqualifiedId changes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85938 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index b2cd3a777c..95a0e98947 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -982,112 +982,6 @@ Parser::ParsePostfixExpressionSuffix(OwningExprResult LHS) { SS, Name, ObjCImpDecl, Tok.is(tok::l_paren)); -#if 0 - if (Tok.is(tok::identifier)) { - if (!LHS.isInvalid()) - LHS = Actions.ActOnMemberReferenceExpr(CurScope, move(LHS), OpLoc, - OpKind, Tok.getLocation(), - *Tok.getIdentifierInfo(), - ObjCImpDecl, &SS); - ConsumeToken(); - } else if (getLang().CPlusPlus && Tok.is(tok::tilde)) { - // We have a C++ pseudo-destructor or a destructor call, e.g., t.~T() - - // Consume the tilde. - ConsumeToken(); - - if (!Tok.is(tok::identifier)) { - Diag(Tok, diag::err_expected_ident); - return ExprError(); - } - - if (NextToken().is(tok::less)) { - // class-name: - // ~ simple-template-id - TemplateTy Template - = Actions.ActOnDependentTemplateName(SourceLocation(), - *Tok.getIdentifierInfo(), - Tok.getLocation(), - SS, - ObjectType); - if (AnnotateTemplateIdToken(Template, TNK_Type_template, &SS, - SourceLocation(), true)) - return ExprError(); - - assert(Tok.is(tok::annot_typename) && - "AnnotateTemplateIdToken didn't work?"); - if (!LHS.isInvalid()) - LHS = Actions.ActOnDestructorReferenceExpr(CurScope, move(LHS), - OpLoc, OpKind, - Tok.getAnnotationRange(), - Tok.getAnnotationValue(), - SS, - NextToken().is(tok::l_paren)); - } else { - // class-name: - // ~ identifier - if (!LHS.isInvalid()) - LHS = Actions.ActOnDestructorReferenceExpr(CurScope, move(LHS), - OpLoc, OpKind, - Tok.getLocation(), - Tok.getIdentifierInfo(), - SS, - NextToken().is(tok::l_paren)); - } - - // Consume the identifier or template-id token. - ConsumeToken(); - } else if (getLang().CPlusPlus && Tok.is(tok::kw_operator)) { - // We have a reference to a member operator, e.g., t.operator int or - // t.operator+. - SourceLocation OperatorLoc = Tok.getLocation(); - - if (OverloadedOperatorKind Op = TryParseOperatorFunctionId()) { - if (!LHS.isInvalid()) - LHS = Actions.ActOnOverloadedOperatorReferenceExpr(CurScope, - move(LHS), OpLoc, - OpKind, - OperatorLoc, - Op, &SS); - // TryParseOperatorFunctionId already consumed our token, so - // don't bother - } else if (TypeTy *ConvType = ParseConversionFunctionId()) { - if (!LHS.isInvalid()) - LHS = Actions.ActOnConversionOperatorReferenceExpr(CurScope, - move(LHS), OpLoc, - OpKind, - OperatorLoc, - ConvType, &SS); - } else { - // Don't emit a diagnostic; ParseConversionFunctionId does it for us - return ExprError(); - } - } else if (getLang().CPlusPlus && Tok.is(tok::annot_template_id)) { - // We have a reference to a member template along with explicitly- - // specified template arguments, e.g., t.f<int>. - TemplateIdAnnotation *TemplateId - = static_cast<TemplateIdAnnotation *>(Tok.getAnnotationValue()); - if (!LHS.isInvalid()) { - ASTTemplateArgsPtr TemplateArgsPtr(Actions, - TemplateId->getTemplateArgs(), - TemplateId->getTemplateArgIsType(), - TemplateId->NumArgs); - - LHS = Actions.ActOnMemberTemplateIdReferenceExpr(CurScope, move(LHS), - OpLoc, OpKind, SS, - TemplateTy::make(TemplateId->Template), - TemplateId->TemplateNameLoc, - TemplateId->LAngleLoc, - TemplateArgsPtr, - TemplateId->getTemplateArgLocations(), - TemplateId->RAngleLoc); - } - ConsumeToken(); - } else { - Diag(Tok, diag::err_expected_ident); - return ExprError(); - } -#endif break; } case tok::plusplus: // postfix-expression: postfix-expression '++' |