mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 378614: Function ptr as K&R parameter.
This commit is contained in:
parent
77442617cc
commit
b1a9377019
2 changed files with 11 additions and 2 deletions
|
@ -674,4 +674,13 @@ public class AST2KnRTests extends AST2BaseTest {
|
|||
fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// void push_constant (in_char, conv_base)
|
||||
// char (*in_char)(void);
|
||||
// int conv_base;
|
||||
// {}
|
||||
public void testFunctionPtrParameter_378614() throws Exception {
|
||||
String code= getAboveComment();
|
||||
parseAndCheckBindings(code, ParserLanguage.C, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1620,7 +1620,7 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
|
|||
IASTDeclarator[] decltors = declaration.getDeclarators();
|
||||
for (IASTDeclarator decltor : decltors) {
|
||||
boolean decltorOk = false;
|
||||
final char[] nchars = decltor.getName().toCharArray();
|
||||
final char[] nchars = ASTQueries.findInnermostDeclarator(decltor).getName().toCharArray();
|
||||
for (IASTName parmName : parmNames) {
|
||||
if (CharArrayUtils.equals(nchars, parmName.toCharArray())) {
|
||||
decltorOk= true;
|
||||
|
|
Loading…
Add table
Reference in a new issue