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));
|
||||
// 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();
|
||||
|
@ -729,7 +733,7 @@ public class CModelBuilder {
|
|||
}
|
||||
return pointerString.toString();
|
||||
}
|
||||
|
||||
|
||||
private String getDeclaratorArrayQualifiers(Declarator declarator){
|
||||
StringBuffer arrayString = new StringBuffer();
|
||||
List arrayQualifiers = declarator.getArrayQualifiers();
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue