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

References

tools/clang/lib/Sema/SemaType.cpp
 4025   if (D.getIdentifier())
 4026     Name = D.getIdentifier();
 4030     D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef ||
 4031     D.getContext() == DeclaratorContext::AliasDeclContext ||
 4032     D.getContext() == DeclaratorContext::AliasTemplateContext;
 4047       for (unsigned I = 0, E = D.getNumTypeObjects(); I != E; ++I) {
 4049         DeclaratorChunk &DeclChunk = D.getTypeObject(Index);
 4068           if (D.isFunctionDeclarationContext() &&
 4069               D.isFunctionDeclarator(FnIndex) && FnIndex == Index)
 4090         D.setInvalidType(true);
 4136     for (unsigned i = 0, n = D.getNumTypeObjects(); i != n; ++i) {
 4137       DeclaratorChunk &chunk = D.getTypeObject(i);
 4189       switch (classifyPointerDeclarator(S, T, D, wrappingKind)) {
 4224           if (const auto *InnermostChunk = D.getInnermostNonParenChunk()) {
 4225             if (hasCFReturnsAttr(D.getAttributes()) ||
 4227                 hasCFReturnsAttr(D.getDeclSpec().getAttributes())) {
 4359                 pointerKind, D.getDeclSpec().getTypeSpecTypeLoc(),
 4360                 D.getDeclSpec().getEndLoc(),
 4361                 D.getMutableDeclSpec().getAttributes(),
 4362                 D.getMutableDeclSpec().getAttributePool())) {
 4371         D.isPrototypeContext() &&
 4372         !hasOuterPointerLikeChunk(D, D.getNumTypeObjects())) {
 4372         !hasOuterPointerLikeChunk(D, D.getNumTypeObjects())) {
 4374                                   D.getDeclSpec().getTypeSpecTypeLoc());
 4384   for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {
 4387     DeclaratorChunk &DeclType = D.getTypeObject(chunkIndex);
 4392         warnAboutRedundantParens(S, D, T);
 4405       T = S.BuildBlockPointerType(T, D.getIdentifierLoc(), Name);
 4418         S.Diag(D.getIdentifierLoc(), diag::err_distant_exception_spec);
 4419         D.setInvalidType(true);
 4441           S.Diag(D.getIdentifierLoc(), diag::err_opencl_pointer_to_type) << T;
 4442           D.setInvalidType(true);
 4454         S.Diag(D.getIdentifierLoc(), diag::err_distant_exception_spec);
 4455         D.setInvalidType(true);
 4468         S.Diag(D.getIdentifierLoc(), diag::err_distant_exception_spec);
 4469         D.setInvalidType(true);
 4481       if (ASM == ArrayType::Star && !D.isPrototypeContext()) {
 4487         D.setInvalidType(true);
 4494         if (!(D.isPrototypeContext() ||
 4495               D.getContext() == DeclaratorContext::KNRTypeListContext)) {
 4502           D.setInvalidType(true);
 4507         if (hasOuterPointerLikeChunk(D, chunkIndex)) {
 4513           D.setInvalidType(true);
 4520           D.getContext() != DeclaratorContext::LambdaExprParameterContext) {
 4534           D.isPrototypeContext() &&
 4535           !hasOuterPointerLikeChunk(D, chunkIndex)) {
 4553       if (!D.isInvalidType()) {
 4556         if (D.getDeclSpec().hasAutoTypeSpec() &&
 4559             S.Diag(D.getDeclSpec().getTypeSpecTypeLoc(),
 4560                    D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto
 4564             D.setInvalidType(true);
 4566             S.Diag(D.getDeclSpec().getTypeSpecTypeLoc(),
 4572             S.Diag(D.getBeginLoc(), diag::err_trailing_return_in_parens)
 4573                 << T << D.getSourceRange();
 4574             D.setInvalidType(true);
 4575           } else if (D.getName().getKind() ==
 4578               S.Diag(D.getDeclSpec().getBeginLoc(),
 4580                   << D.getSourceRange();
 4581               D.setInvalidType(true);
 4583           } else if (D.getContext() != DeclaratorContext::LambdaExprContext &&
 4587             S.Diag(D.getDeclSpec().getTypeSpecTypeLoc(),
 4589                 << T << D.getDeclSpec().getSourceRange();
 4590             D.setInvalidType(true);
 4596             D.setInvalidType(true);
 4606       if (!D.isInvalidType() && (T->isArrayType() || T->isFunctionType()) &&
 4607           (D.getName().getKind() !=
 4613             D.getContext() == DeclaratorContext::BlockLiteralContext)
 4617         D.setInvalidType(true);
 4625             S.Diag(D.getIdentifierLoc(), diag::err_opencl_invalid_return)
 4627             D.setInvalidType(true);
 4630           S.Diag(D.getIdentifierLoc(),
 4632           D.setInvalidType(true);
 4641           S.Diag(D.getIdentifierLoc(), diag::err_opencl_invalid_return)
 4643           D.setInvalidType(true);
 4649             !(D.getIdentifier() &&
 4650               ((D.getIdentifier()->getName() == "printf" &&
 4652                D.getIdentifier()->getName().startswith("__")))) {
 4653           S.Diag(D.getIdentifierLoc(), diag::err_opencl_variadic_function);
 4654           D.setInvalidType(true);
 4666           DiagLoc = D.getDeclSpec().getTypeSpecTypeLoc();
 4667           FixitLoc = S.getLocForEndOfToken(D.getDeclSpec().getEndLoc());
 4682         D.setInvalidType(true);
 4691             D.getFunctionDefinitionKind() == FDK_Definition) {
 4697           diagnoseRedundantReturnTypeQualifiers(S, T, D, chunkIndex);
 4710         if (chunkIndex + 1 < D.getNumTypeObjects()) {
 4711           DeclaratorChunk ReturnTypeChunk = D.getTypeObject(chunkIndex + 1);
 4720           for (const ParsedAttr &AL : D.getDeclSpec().getAttributes()) {
 4741       if (LangOpts.CPlusPlus && D.getDeclSpec().hasTagDefinition()) {
 4744         TagDecl *Tag = cast<TagDecl>(D.getDeclSpec().getRepAsDecl());
 4754             << (D.getContext() == DeclaratorContext::AliasDeclContext ||
 4755                 D.getContext() == DeclaratorContext::AliasTemplateContext);
 4760         warnAboutAmbiguousFunction(S, D, DeclType, T);
 4763           getCCForDeclaratorChunk(S, D, DeclType.getAttrs(), FTI, chunkIndex));
 4774           if (!D.getAttributes().hasAttribute(ParsedAttr::AT_Overloadable))
 4782           D.setInvalidType(true);
 4844                 D.setInvalidType();
 4850               D.setInvalidType();
 4913         S.checkExceptionSpecification(D.isFunctionDeclarationContext(),
 4942                 D.setInvalidType(true);
 4968         D.setInvalidType(true);
 5000           << (D.getIdentifier() ? D.getIdentifier()->getName() : "type name")
 5000           << (D.getIdentifier() ? D.getIdentifier()->getName() : "type name")
 5002         D.setInvalidType(true);
 5007                                      D.getIdentifier());
 5010         D.setInvalidType(true);
 5020                        D.getMutableDeclSpec().getAttributes());
 5026       D.setInvalidType(true);
 5053   if (!LangOpts.CPlusPlus && D.getFunctionDefinitionKind() == FDK_Declaration) {
 5055     for (const DeclaratorChunk &DeclType : D.type_objects()) {
 5093     if (D.getName().getKind() == UnqualifiedIdKind::IK_DeductionGuideName)
 5095     else if (!D.getCXXScopeSpec().isSet()) {
 5096       if ((D.getContext() == DeclaratorContext::MemberContext ||
 5097            D.getContext() == DeclaratorContext::LambdaExprContext) &&
 5098           !D.getDeclSpec().isFriendSpecified())
 5101       DeclContext *DC = S.computeDeclContext(D.getCXXScopeSpec());
 5124           D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_static) &&
 5126         D.getContext() != DeclaratorContext::TemplateArgContext &&
 5127         D.getContext() != DeclaratorContext::TemplateTypeArgContext) {
 5128       SourceLocation Loc = D.getBeginLoc();
 5131       if (D.isFunctionDeclarator(I)) {
 5133         const DeclaratorChunk &Chunk = D.getTypeObject(I);
 5153         << Kind << D.isFunctionDeclarator() << T
 5165       for (unsigned i = 0, e = D.getNumTypeObjects(); i != e; ++i) {
 5166         if (D.getTypeObject(i).Kind != DeclaratorChunk::Paren)
 5174   processTypeAttrs(state, T, TAL_DeclName, D.getAttributes());
 5182   if (D.getDeclSpec().getConstexprSpecifier() == CSK_constexpr &&
 5189       (D.getContext() == DeclaratorContext::PrototypeContext ||
 5190        D.getContext() == DeclaratorContext::LambdaExprParameterContext))
 5191     S.Diag(D.getIdentifierLoc(), diag::warn_deprecated_volatile_param) << T;
 5195   if (D.hasEllipsis()) {
 5200     switch (D.getContext()) {
 5213         S.Diag(D.getEllipsisLoc(),
 5215           << T <<  D.getSourceRange();
 5216         D.setEllipsisLoc(SourceLocation());
 5233         S.Diag(D.getEllipsisLoc(),
 5266       S.Diag(D.getEllipsisLoc(),
 5268       D.setEllipsisLoc(SourceLocation());
 5274   if (D.isInvalidType())