reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/lib/Parse/ParseDecl.cpp
 5737   DeclaratorScopeObj DeclScopeObj(*this, D.getCXXScopeSpec());
 5739   if (getLangOpts().CPlusPlus && D.mayHaveIdentifier()) {
 5741     if (Tok.is(tok::l_square) && !D.mayOmitIdentifier() &&
 5742         D.getCXXScopeSpec().isEmpty())
 5743       return ParseDecompositionDeclarator(D);
 5749         *this, D.getContext() == DeclaratorContext::MemberContext ||
 5750                    (D.getContext() == DeclaratorContext::ForContext &&
 5754     if (D.getCXXScopeSpec().isEmpty()) {
 5756           D.getContext() == DeclaratorContext::FileContext ||
 5757           D.getContext() == DeclaratorContext::MemberContext;
 5758       ParseOptionalCXXScopeSpecifier(D.getCXXScopeSpec(), nullptr,
 5762     if (D.getCXXScopeSpec().isValid()) {
 5764                                              D.getCXXScopeSpec()))
 5771         D.SetIdentifier(nullptr, Tok.getLocation());
 5772         D.setInvalidType(true);
 5785     if (Tok.is(tok::ellipsis) && D.getCXXScopeSpec().isEmpty() &&
 5786         !((D.getContext() == DeclaratorContext::PrototypeContext ||
 5787            D.getContext() == DeclaratorContext::LambdaExprParameterContext ||
 5788            D.getContext() == DeclaratorContext::BlockLiteralContext) &&
 5790           !D.hasGroupingParens() &&
 5791           !Actions.containsUnexpandedParameterPacks(D) &&
 5792           D.getDeclSpec().getTypeSpecType() != TST_auto)) {
 5794       if (isPtrOperatorToken(Tok.getKind(), getLangOpts(), D.getContext())) {
 5797         ParseDeclarator(D);
 5799           DiagnoseMisplacedEllipsisInDeclarator(EllipsisLoc, D);
 5802         D.setEllipsisLoc(EllipsisLoc);
 5815       if (D.getDeclSpec().hasTypeSpecifier()) {
 5818       } else if (D.getCXXScopeSpec().isSet()) {
 5820           (D.getContext() == DeclaratorContext::FileContext ||
 5821            D.getContext() == DeclaratorContext::MemberContext);
 5825             (D.getContext() == DeclaratorContext::MemberContext);
 5827           (D.getContext() == DeclaratorContext::FileContext ||
 5828            D.getContext() == DeclaratorContext::MemberContext);
 5831       bool HadScope = D.getCXXScopeSpec().isValid();
 5832       if (ParseUnqualifiedId(D.getCXXScopeSpec(),
 5836                              D.getName()) ||
 5839           D.getCXXScopeSpec().isInvalid()) {
 5840         D.SetIdentifier(nullptr, Tok.getLocation());
 5841         D.setInvalidType(true);
 5845         if (!HadScope && D.getCXXScopeSpec().isValid() &&
 5847                                                D.getCXXScopeSpec()))
 5851         if (D.getSourceRange().getBegin().isInvalid())
 5852           D.SetRangeBegin(D.getName().getSourceRange().getBegin());
 5852           D.SetRangeBegin(D.getName().getSourceRange().getBegin());
 5853         D.SetRangeEnd(D.getName().getSourceRange().getEnd());
 5853         D.SetRangeEnd(D.getName().getSourceRange().getEnd());
 5858     if (D.getCXXScopeSpec().isNotEmpty()) {
 5860       Diag(PP.getLocForEndOfToken(D.getCXXScopeSpec().getEndLoc()),
 5863       D.SetIdentifier(nullptr, Tok.getLocation());
 5866   } else if (Tok.is(tok::identifier) && D.mayHaveIdentifier()) {
 5870     D.SetIdentifier(Tok.getIdentifierInfo(), Tok.getLocation());
 5871     D.SetRangeEnd(Tok.getLocation());
 5874   } else if (Tok.is(tok::identifier) && !D.mayHaveIdentifier()) {
 5879     if (D.hasGroupingParens())
 5883     else if (D.getContext() == DeclaratorContext::TemplateArgContext)
 5887     else if (D.getContext() == DeclaratorContext::AliasDeclContext ||
 5888              D.getContext() == DeclaratorContext::AliasTemplateContext)
 5891     else if ((D.getContext() == DeclaratorContext::TrailingReturnContext ||
 5892               D.getContext() == DeclaratorContext::TrailingReturnVarContext) &&
 5899       D.SetIdentifier(nullptr, Tok.getLocation());
 5909     if (D.mayOmitIdentifier() && D.mayBeFollowedByCXXDirectInit()) {
 5909     if (D.mayOmitIdentifier() && D.mayBeFollowedByCXXDirectInit()) {
 5911       if (TryParseDeclarator(true, D.mayHaveIdentifier(), true) ==
 5913         D.SetIdentifier(nullptr, Tok.getLocation());
 5921     ParseParenDeclarator(D);
 5926     if (D.getCXXScopeSpec().isSet()) {
 5929       if (!D.isInvalidType() &&
 5931                                              D.getCXXScopeSpec()))
 5936   } else if (D.mayOmitIdentifier()) {
 5939     D.SetIdentifier(nullptr, Tok.getLocation());
 5943     if (D.hasEllipsis() && D.hasGroupingParens())
 5943     if (D.hasEllipsis() && D.hasGroupingParens())
 5944       Diag(PP.getLocForEndOfToken(D.getEllipsisLoc()),
 5950       return ParseMisplacedBracketDeclarator(D);
 5951     if (D.getContext() == DeclaratorContext::MemberContext) {
 5957         Diag(getMissingDeclaratorIdLoc(D, Tok.getLocation()),
 5960             << (D.getDeclSpec().isEmpty() ? SourceRange()
 5961                                           : D.getDeclSpec().getSourceRange());
 5962         D.SetIdentifier(Tok.getIdentifierInfo(), Tok.getLocation());
 5963         D.SetRangeEnd(Tok.getLocation());
 5967       Diag(getMissingDeclaratorIdLoc(D, Tok.getLocation()),
 5969           << (D.getDeclSpec().isEmpty() ? SourceRange()
 5970                                         : D.getDeclSpec().getSourceRange());
 5975         SourceLocation Loc = D.getCXXScopeSpec().getEndLoc();
 5980           Diag(getMissingDeclaratorIdLoc(D, Tok.getLocation()),
 5985       Diag(getMissingDeclaratorIdLoc(D, Tok.getLocation()),
 5989     D.SetIdentifier(nullptr, Tok.getLocation());
 5990     D.setInvalidType(true);
 5994   assert(D.isPastIdentifier() &&
 5998   if (D.hasName() && !D.getNumTypeObjects())
 5998   if (D.hasName() && !D.getNumTypeObjects())
 5999     MaybeParseCXX11Attributes(D);
 6007                                 (D.isFunctionDeclaratorAFunctionDeclaration()
 6014       if (getLangOpts().CPlusPlus && D.mayBeFollowedByCXXDirectInit()) {
 6017         TentativelyDeclaredIdentifiers.push_back(D.getIdentifier());
 6026       ParseFunctionDeclarator(D, attrs, T, IsAmbiguous);
 6029       ParseBracketDeclarator(D);