mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 314113: False syntax error.
This commit is contained in:
parent
077a57b7a5
commit
27f89cdca5
2 changed files with 10 additions and 1 deletions
|
@ -8554,4 +8554,12 @@ public class AST2CPPTests extends AST2BaseTest {
|
|||
String code= getAboveComment();
|
||||
parseAndCheckBindings(code);
|
||||
}
|
||||
|
||||
// void test() {
|
||||
// void *libHandle (0);
|
||||
// }
|
||||
public void testCTorInitializerForVoidPtr_314113() throws Exception {
|
||||
String code= getAboveComment();
|
||||
parseAndCheckBindings(code);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2795,7 +2795,8 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
|
|||
if (CPPVisitor.doesNotSpecifyType(declspec)) {
|
||||
return false;
|
||||
}
|
||||
if (sspec.getType() == IASTSimpleDeclSpecifier.t_void) {
|
||||
if (sspec.getType() == IASTSimpleDeclSpecifier.t_void && dtor != null &&
|
||||
dtor.getPointerOperators().length == 0 && dtor.getNestedDeclarator() == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue