Changes in src/Parser/DeclarationNode.cc [6ef2d81:138e29e]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r6ef2d81 r138e29e 921 921 Declaration * decl = extr->build(); 922 922 if ( decl ) { 923 decl->location = cur->location; 923 924 * out++ = decl; 924 925 } // if … … 928 929 Declaration * decl = cur->build(); 929 930 if ( decl ) { 931 decl->location = cur->location; 930 932 * out++ = decl; 931 933 } // if 932 934 } catch( SemanticError &e ) { 935 e.set_location( cur->location ); 933 936 errors.append( e ); 934 937 } // try … … 950 953 if ( decl ) { 951 954 if ( DeclarationWithType * dwt = dynamic_cast< DeclarationWithType * >( decl ) ) { 955 dwt->location = cur->location; 952 956 * out++ = dwt; 953 957 } else if ( StructDecl * agg = dynamic_cast< StructDecl * >( decl ) ) { 954 958 StructInstType * inst = new StructInstType( Type::Qualifiers(), agg->get_name() ); 955 * out++ = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, nullptr, inst, nullptr ); 959 auto obj = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, nullptr, inst, nullptr ); 960 obj->location = cur->location; 961 * out++ = obj; 956 962 delete agg; 957 963 } else if ( UnionDecl * agg = dynamic_cast< UnionDecl * >( decl ) ) { 958 964 UnionInstType * inst = new UnionInstType( Type::Qualifiers(), agg->get_name() ); 959 * out++ = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, nullptr, inst, nullptr ); 965 auto obj = new ObjectDecl( "", DeclarationNode::NoStorageClass, linkage, nullptr, inst, nullptr ); 966 obj->location = cur->location; 967 * out++ = obj; 960 968 } // if 961 969 } // if 962 970 } catch( SemanticError &e ) { 971 e.set_location( cur->location ); 963 972 errors.append( e ); 964 973 } // try … … 979 988 * out++ = cur->buildType(); 980 989 } catch( SemanticError &e ) { 990 e.set_location( cur->location ); 981 991 errors.append( e ); 982 992 } // try
Note: See TracChangeset
for help on using the changeset viewer.