-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party
Description
// clang -cc1 -ast-dump -fblocks /tmp/t.c
int (^a)(int, int) = ^(int, undefine b) {
return 1;
};
The BlockDecl
AST node looks like below:
-BlockDecl 0x5608ac620da0 <line:4:22, line:6:1> line:4:22
| |-ParmVarDecl 0x5608ac620e38 <col:24> col:27 'int'
| |-ParmVarDecl 0x5608ac620ed0 <col:29, col:38> col:38 invalid b 'int'
| |-CompoundStmt 0x5608ac620fe8 <col:41, line:6:1>
| | `-ReturnStmt 0x5608ac620fd8 <line:5:4, col:11>
| | `-IntegerLiteral 0x5608ac620fb8 <col:11> 'int' 1
| `-ParmVarDecl 0x5608ac620ed0 <line:4:29, col:38> col:38 invalid b 'int'
two issues:
-
- the invalid bit of
BlockDecl
is not set, we should set it because of its invalidParmDecl
- the invalid bit of
-
- The ast-dumper seems to emit a duplicated
ParmVarDecl
for b
- The ast-dumper seems to emit a duplicated
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party