Home | History | Annotate | Download | only in Sema

Lines Matching refs:DeclSpec

30 #include "clang/Sema/DeclSpec.h"
121 /// DeclSpec.
130 /// The original set of attributes on the DeclSpec.
167 /// Save the current set of attributes on the DeclSpec.
172 DeclSpec &spec = getMutableDeclSpec();
202 DeclSpec &getMutableDeclSpec() const {
203 return const_cast<DeclSpec&>(declarator.getDeclSpec());
574 /// \brief Convert the specified declspec to the appropriate type
580 // FIXME: Should move the logic from DeclSpec::Finish to here for validity
585 const DeclSpec &DS = declarator.getDeclSpec();
594 case DeclSpec::TST_void:
597 case DeclSpec::TST_char:
598 if (DS.getTypeSpecSign() == DeclSpec::TSS_unspecified)
600 else if (DS.getTypeSpecSign() == DeclSpec::TSS_signed)
603 assert(DS.getTypeSpecSign() == DeclSpec::TSS_unsigned &&
608 case DeclSpec::TST_wchar:
609 if (DS.getTypeSpecSign() == DeclSpec::TSS_unspecified)
611 else if (DS.getTypeSpecSign() == DeclSpec::TSS_signed) {
616 assert(DS.getTypeSpecSign() == DeclSpec::TSS_unsigned &&
623 case DeclSpec::TST_char16:
624 assert(DS.getTypeSpecSign() == DeclSpec::TSS_unspecified &&
628 case DeclSpec::TST_char32:
629 assert(DS.getTypeSpecSign() == DeclSpec::TSS_unspecified &&
633 case DeclSpec::TST_unspecified:
635 if (DeclSpec::ProtocolQualifierListTy PQ = DS.getProtocolQualifiers()) {
643 // If this is a missing declspec in a block literal return context, then it
645 // The declspec is always missing in a lambda expr context; it is either
657 // allowed to be completely missing a declspec. This is handled in the
661 // In C89 mode, we only warn if there is a completely missing declspec
690 case DeclSpec::TST_int: {
691 if (DS.getTypeSpecSign() != DeclSpec::TSS_unsigned) {
693 case DeclSpec::TSW_unspecified: Result = Context.IntTy; break;
694 case DeclSpec::TSW_short: Result = Context.ShortTy; break;
695 case DeclSpec::TSW_long: Result = Context.LongTy; break;
696 case DeclSpec::TSW_longlong:
708 case DeclSpec::TSW_unspecified: Result = Context.UnsignedIntTy; break;
709 case DeclSpec::TSW_short: Result = Context.UnsignedShortTy; break;
710 case DeclSpec::TSW_long: Result = Context.UnsignedLongTy; break;
711 case DeclSpec::TSW_longlong:
724 case DeclSpec::TST_int128:
725 if (DS.getTypeSpecSign() == DeclSpec::TSS_unsigned)
730 case DeclSpec::TST_half: Result = Context.HalfTy; break;
731 case DeclSpec::TST_float: Result = Context.FloatTy; break;
732 case DeclSpec::TST_double:
733 if (DS.getTypeSpecWidth() == DeclSpec::TSW_long)
743 case DeclSpec::TST_bool: Result = Context.BoolTy; break; // _Bool or bool
744 case DeclSpec::TST_decimal32: // _Decimal32
745 case DeclSpec::TST_decimal64: // _Decimal64
746 case DeclSpec::TST_decimal128: // _Decimal128
751 case DeclSpec::TST_class:
752 case DeclSpec::TST_enum:
753 case DeclSpec::TST_union:
754 case DeclSpec::TST_struct: {
778 case DeclSpec::TST_typename: {
785 else if (DeclSpec::ProtocolQualifierListTy PQ
819 case DeclSpec::TST_typeofType:
829 case DeclSpec::TST_typeofExpr: {
840 case DeclSpec::TST_decltype: {
851 case DeclSpec::TST_underlyingType:
863 case DeclSpec::TST_auto: {
869 case DeclSpec::TST_unknown_anytype:
873 case DeclSpec::TST_atomic:
883 case DeclSpec::TST_error:
890 if (DS.getTypeSpecComplex() == DeclSpec::TSC_complex) {
906 if (DS.getTypeSpecComplex() == DeclSpec::TSC_imaginary)
926 if (TypeQuals & DeclSpec::TQ_restrict) {
942 TypeQuals &= ~DeclSpec::TQ_restrict; // Remove the restrict qualifier.
948 TypeQuals &= ~DeclSpec::TQ_restrict; // Remove the restrict qualifier.
958 if (TypeQuals & DeclSpec::TQ_const)
960 else if (TypeQuals & DeclSpec::TQ_volatile)
963 assert((TypeQuals & DeclSpec::TQ_restrict) &&
977 if (DS.getTypeSpecType() == DeclSpec::TST_typename &&
979 TypeQuals &= ~DeclSpec::TQ_const;
980 TypeQuals &= ~DeclSpec::TQ_volatile;
988 if (TypeQuals & DeclSpec::TQ_const && Result.isConstQualified()) {
993 if (TypeQuals & DeclSpec::TQ_volatile && Result.isVolatileQualified()) {
1779 // The TagDecl owned by the DeclSpec.
1820 if (D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto &&
1835 if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static)
1875 if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef)
2059 D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef ||
2167 if (D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto &&
2499 D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_static &&
2502 !(FnTy->getTypeQuals() & DeclSpec::TQ_const)) {
2505 EPI.TypeQuals |= DeclSpec::TQ_const;
2522 D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_static) &&
2722 /*declspec*/ false, /*C++0x*/ false);
2856 const DeclSpec &DS;
2859 TypeSpecLocFiller(ASTContext &Context, const DeclSpec &DS)
2877 if (DS.getTypeSpecType() == DeclSpec::TST_unspecified) {
2925 assert(DS.getTypeSpecType() == DeclSpec::TST_typeofExpr);
2930 assert(DS.getTypeSpecType() == DeclSpec::TST_typeofType);
2940 assert(DS.getTypeSpecType() == DeclSpec::TST_underlyingType);
3996 != DeclSpec::SCS_typedef)