Commit 9bb4086
[Clang] Do not attempt to access the
Summary:
We were asserting here because we were trying to access the
`DefinitionData` of an incomplete type in the `Visit` lambda in
`CXXRecordDecl::hasSubobjectAtOffsetZeroOfEmptyBaseType`.
The code that creates `FieldDecl`s always marks them as invalid
if their type is incomplete, so checking whether the field decl
whose type we’re about to look at is invalid fixes this issue.
Fixes #99868.
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: https://phabricator.intern.facebook.com/D60251469DefinitionData of an incomplete type (#99998)1 parent 89ab5fa commit 9bb4086
File tree
3 files changed
+14
-0
lines changed- clang
- docs
- lib/AST
- test/CXX/temp/temp.arg/temp.arg.template
3 files changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1105 | 1105 | | |
1106 | 1106 | | |
1107 | 1107 | | |
| 1108 | + | |
1108 | 1109 | | |
1109 | 1110 | | |
1110 | 1111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
678 | 681 | | |
679 | 682 | | |
680 | 683 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments