1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Patch for Hoda Amer

Fix for bug : const & volatile modifier missing from pointer to function signature  
+ 2 more STLFailedtests
This commit is contained in:
John Camelon 2003-04-25 15:58:44 +00:00
parent 5be39b90ed
commit 1afa3710ae
2 changed files with 18 additions and 4 deletions

View file

@ -638,9 +638,13 @@ public class CModelBuilder {
type.append(getDeclarationType(declaration));
// add pointerr or reference from declarator if any
type.append(getDeclaratorPointerOperation(declarator));
// pointer to function or array of functions
if(declarator.getDeclarator() != null)
type.append("(*)");
if(declarator.getDeclarator() != null){
// pointer to function or array of functions
type.append("(");
// add pointerr or reference from declarator if any
type.append(getDeclaratorPointerOperation(declarator.getDeclarator()));
type.append(")");
}
// arrays
type.append(getDeclaratorArrayQualifiers(declarator));
return type.toString();

View file

@ -49,4 +49,14 @@ public class STLFailedTests extends BaseDOMTest {
code.write("{}\n");
failTest(code.toString());
}
public void testBug36805() throws Exception{
Writer code = new StringWriter();
code.write("__STL_BEGIN_NAMESPACE\n");
code.write("template <class _CharT> class char_traits\n");
code.write(": public __char_traits_base<_CharT, _CharT>\n");
code.write("{};\n");
failTest(code.toString());
}
}