Ignore:
Timestamp:
Mar 11, 2024, 1:00:41 PM (3 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
6c8b76b
Parents:
9398177
Message:

Moved the DeclarationNode? enums over to TypeData? where they are actually used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r9398177 re048ece  
    4545
    4646using namespace std;
    47 
    48 // These must harmonize with the corresponding DeclarationNode enumerations.
    49 const char * DeclarationNode::basicTypeNames[] = {
    50         "void", "_Bool", "char", "int", "int128",
    51         "float", "double", "long double", "float80", "float128",
    52         "_float16", "_float32", "_float32x", "_float64", "_float64x", "_float128", "_float128x", "NoBasicTypeNames"
    53 };
    54 const char * DeclarationNode::complexTypeNames[] = {
    55         "_Complex", "NoComplexTypeNames", "_Imaginary"
    56 }; // Imaginary unsupported => parse, but make invisible and print error message
    57 const char * DeclarationNode::signednessNames[] = {
    58         "signed", "unsigned", "NoSignednessNames"
    59 };
    60 const char * DeclarationNode::lengthNames[] = {
    61         "short", "long", "long long", "NoLengthNames"
    62 };
    63 const char * DeclarationNode::builtinTypeNames[] = {
    64         "__builtin_va_list", "__auto_type", "zero_t", "one_t", "NoBuiltinTypeNames"
    65 };
    6647
    6748UniqueName DeclarationNode::anonymous( "__anonymous" );
     
    484465
    485466        checkQualifiers( type, q->type );
    486         BuiltinType const builtin = type->builtintype;
    487         if ( (builtin == Zero || builtin == One) && q->type->qualifiers.any() && error.length() == 0 ) {
    488                 SemanticWarning( yylloc, Warning::BadQualifiersZeroOne, builtinTypeNames[builtin] );
     467        TypeData::BuiltinType const builtin = type->builtintype;
     468        if ( (builtin == TypeData::Zero || builtin == TypeData::One) && q->type->qualifiers.any() && error.length() == 0 ) {
     469                SemanticWarning( yylloc, Warning::BadQualifiersZeroOne, TypeData::builtinTypeNames[builtin] );
    489470        } // if
    490471        type = ::addQualifiers( q->type, type );
Note: See TracChangeset for help on using the changeset viewer.