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