Commit bc6d0f1
[Sema] Add MacroQualified case for FunctionTypeUnwrapper
This is a fix for PR43315. An assertion error is hit for this minimal example:
```
//clang -cc1 -triple x86_64-- -S tstVMStructRC-min.cpp
int (a b)(); // Assertion `Chunk.Kind == DeclaratorChunk::Function' failed.
```
This is because we do not cover the case in the FunctionTypeUnwrapper where it
receives a MacroQualifiedType. We have not run into this earlier because this
is a unique case where the __attribute__ contains both __cdecl__ and
__regparm__ (in that order), and we are compiling for x86_64. Changing the
architecture or the order of __cdecl__ and __regparm__ does not raise the
assertion.
Differential Revision: https://reviews.llvm.org/D67992
(cherry picked from commit e278c13)1 parent 2cec4d0 commit bc6d0f1
File tree
2 files changed
+12
-1
lines changed- clang
- lib/Sema
- test/Frontend
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6325 | 6325 | | |
6326 | 6326 | | |
6327 | 6327 | | |
6328 | | - | |
| 6328 | + | |
| 6329 | + | |
6329 | 6330 | | |
6330 | 6331 | | |
6331 | 6332 | | |
| |||
6356 | 6357 | | |
6357 | 6358 | | |
6358 | 6359 | | |
| 6360 | + | |
| 6361 | + | |
| 6362 | + | |
6359 | 6363 | | |
6360 | 6364 | | |
6361 | 6365 | | |
| |||
6412 | 6416 | | |
6413 | 6417 | | |
6414 | 6418 | | |
| 6419 | + | |
| 6420 | + | |
| 6421 | + | |
6415 | 6422 | | |
6416 | 6423 | | |
6417 | 6424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments