1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 20:05:35 +02:00

bug 179712 - function declaration with both throw and attribute modifiers

This commit is contained in:
Andrew Niefer 2007-08-04 00:42:52 +00:00
parent 7195ef8aca
commit 9577e25245
2 changed files with 11 additions and 0 deletions

View file

@ -5503,4 +5503,12 @@ public class AST2CPPTests extends AST2BaseTest {
parse( buffer.toString(), ParserLanguage.CPP, true, true );
}
public void testBug179712() throws Exception {
StringBuffer buffer = new StringBuffer();
buffer.append( "void foo (void *p) throw () ; \n"); //$NON-NLS-1$
buffer.append( "void bar (void *p) __attribute__ (( __nonnull__(1) )); \n"); //$NON-NLS-1$
buffer.append( "void zot (void *p) throw () __attribute__ (( __nonnull__(1) )); \n"); //$NON-NLS-1$
parse( buffer.toString(), ParserLanguage.CPP, true, true );
}
}

View file

@ -4092,6 +4092,9 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
break;
}
}
// more __attribute__ after throws
__attribute_decl_seq(supportAttributeSpecifiers, false);
}
// check for optional pure virtual
if (LT(1) == IToken.tASSIGN && LT(2) == IToken.tINTEGER) {