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:
parent
5be39b90ed
commit
1afa3710ae
2 changed files with 18 additions and 4 deletions
|
@ -638,9 +638,13 @@ public class CModelBuilder {
|
||||||
type.append(getDeclarationType(declaration));
|
type.append(getDeclarationType(declaration));
|
||||||
// add pointerr or reference from declarator if any
|
// add pointerr or reference from declarator if any
|
||||||
type.append(getDeclaratorPointerOperation(declarator));
|
type.append(getDeclaratorPointerOperation(declarator));
|
||||||
|
if(declarator.getDeclarator() != null){
|
||||||
// pointer to function or array of functions
|
// pointer to function or array of functions
|
||||||
if(declarator.getDeclarator() != null)
|
type.append("(");
|
||||||
type.append("(*)");
|
// add pointerr or reference from declarator if any
|
||||||
|
type.append(getDeclaratorPointerOperation(declarator.getDeclarator()));
|
||||||
|
type.append(")");
|
||||||
|
}
|
||||||
// arrays
|
// arrays
|
||||||
type.append(getDeclaratorArrayQualifiers(declarator));
|
type.append(getDeclaratorArrayQualifiers(declarator));
|
||||||
return type.toString();
|
return type.toString();
|
||||||
|
|
|
@ -49,4 +49,14 @@ public class STLFailedTests extends BaseDOMTest {
|
||||||
code.write("{}\n");
|
code.write("{}\n");
|
||||||
failTest(code.toString());
|
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());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue