Home | History | Annotate | Download | only in Sema

Lines Matching refs:DeclSpec

28 #include "clang/Sema/DeclSpec.h"
123 /// DeclSpec.
132 /// The original set of attributes on the DeclSpec.
172 /// Save the current set of attributes on the DeclSpec.
177 DeclSpec &spec = getMutableDeclSpec();
207 DeclSpec &getMutableDeclSpec() const {
208 return const_cast<DeclSpec&>(declarator.getDeclSpec());
695 /// \brief Convert the specified declspec to the appropriate type
702 // FIXME: Should move the logic from DeclSpec::Finish to here for validity
707 const DeclSpec &DS = declarator.getDeclSpec();
716 case DeclSpec::TST_void:
719 case DeclSpec::TST_char:
720 if (DS.getTypeSpecSign() == DeclSpec::TSS_unspecified)
722 else if (DS.getTypeSpecSign() == DeclSpec::TSS_signed)
725 assert(DS.getTypeSpecSign() == DeclSpec::TSS_unsigned &&
730 case DeclSpec::TST_wchar:
731 if (DS.getTypeSpecSign() == DeclSpec::TSS_unspecified)
733 else if (DS.getTypeSpecSign() == DeclSpec::TSS_signed) {
738 assert(DS.getTypeSpecSign() == DeclSpec::TSS_unsigned &&
745 case DeclSpec::TST_char16:
746 assert(DS.getTypeSpecSign() == DeclSpec::TSS_unspecified &&
750 case DeclSpec::TST_char32:
751 assert(DS.getTypeSpecSign() == DeclSpec::TSS_unspecified &&
755 case DeclSpec::TST_unspecified:
757 if (DeclSpec::ProtocolQualifierListTy PQ = DS.getProtocolQualifiers()) {
765 // If this is a missing declspec in a block literal return context, then it
767 // The declspec is always missing in a lambda expr context; it is either
779 // allowed to be completely missing a declspec. This is handled in the
783 // In C89 mode, we only warn if there is a completely missing declspec
812 case DeclSpec::TST_int: {
813 if (DS.getTypeSpecSign() != DeclSpec::TSS_unsigned) {
815 case DeclSpec::TSW_unspecified: Result = Context.IntTy; break;
816 case DeclSpec::TSW_short: Result = Context.ShortTy; break;
817 case DeclSpec::TSW_long: Result = Context.LongTy; break;
818 case DeclSpec::TSW_longlong:
834 case DeclSpec::TSW_unspecified: Result = Context.UnsignedIntTy; break;
835 case DeclSpec::TSW_short: Result = Context.UnsignedShortTy; break;
836 case DeclSpec::TSW_long: Result = Context.UnsignedLongTy; break;
837 case DeclSpec::TSW_longlong:
854 case DeclSpec::TST_int128:
857 if (DS.getTypeSpecSign() == DeclSpec::TSS_unsigned)
862 case DeclSpec::TST_half: Result = Context.HalfTy; break;
863 case DeclSpec::TST_float: Result = Context.FloatTy; break;
864 case DeclSpec::TST_double:
865 if (DS.getTypeSpecWidth() == DeclSpec::TSW_long)
875 case DeclSpec::TST_bool: Result = Context.BoolTy; break; // _Bool or bool
876 case DeclSpec::TST_decimal32: // _Decimal32
877 case DeclSpec::TST_decimal64: // _Decimal64
878 case DeclSpec::TST_decimal128: // _Decimal128
883 case DeclSpec::TST_class:
884 case DeclSpec::TST_enum:
885 case DeclSpec::TST_union:
886 case DeclSpec::TST_struct:
887 case DeclSpec::TST_interface: {
911 case DeclSpec::TST_typename: {
918 else if (DeclSpec::ProtocolQualifierListTy PQ
952 case DeclSpec::TST_typeofType:
962 case DeclSpec::TST_typeofExpr: {
973 case DeclSpec::TST_decltype: {
984 case DeclSpec::TST_underlyingType:
996 case DeclSpec::TST_auto: {
1002 case DeclSpec::TST_unknown_anytype:
1006 case DeclSpec::TST_atomic:
1016 case DeclSpec::TST_image1d_t:
1020 case DeclSpec::TST_image1d_array_t:
1024 case DeclSpec::TST_image1d_buffer_t:
1028 case DeclSpec::TST_image2d_t:
1032 case DeclSpec::TST_image2d_array_t:
1036 case DeclSpec::TST_image3d_t:
1040 case DeclSpec::TST_sampler_t:
1044 case DeclSpec::TST_event_t:
1048 case DeclSpec::TST_error:
1055 if (DS.getTypeSpecComplex() == DeclSpec::TSC_complex) {
1071 if (DS.getTypeSpecComplex() == DeclSpec::TSC_imaginary)
1091 if (TypeQuals & DeclSpec::TQ_restrict) {
1107 TypeQuals &= ~DeclSpec::TQ_restrict; // Remove the restrict qualifier.
1113 TypeQuals &= ~DeclSpec::TQ_restrict; // Remove the restrict qualifier.
1123 if (TypeQuals & DeclSpec::TQ_const)
1125 else if (TypeQuals & DeclSpec::TQ_volatile)
1128 assert((TypeQuals & DeclSpec::TQ_restrict) &&
1142 if (DS.getTypeSpecType() == DeclSpec::TST_typename &&
1144 TypeQuals &= ~DeclSpec::TQ_const;
1145 TypeQuals &= ~DeclSpec::TQ_volatile;
1153 if (TypeQuals & DeclSpec::TQ_const && Result.isConstQualified()) {
1158 if (TypeQuals & DeclSpec::TQ_volatile && Result.isVolatileQualified()) {
1928 // The TagDecl owned by the DeclSpec.
1971 if (D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto &&
1986 if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static)
2027 if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef)
2213 != DeclSpec::SCS_unspecified)
2301 D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef ||
2454 if (D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto &&
2849 D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_static) &&
3193 const DeclSpec &DS;
3196 TypeSpecLocFiller(ASTContext &Context, const DeclSpec &DS)
3218 if (DS.getTypeSpecType() == DeclSpec::TST_unspecified) {
3266 assert(DS.getTypeSpecType() == DeclSpec::TST_typeofExpr);
3271 assert(DS.getTypeSpecType() == DeclSpec::TST_typeofType);
3281 assert(DS.getTypeSpecType() == DeclSpec::TST_underlyingType);
3687 // Don't accept an ownership attribute in the declspec if it would