You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[clang] Fix computeTypeLinkageInfo for non-record member pointers
MemberPointerType can point to records, functions, or types from
template parameters. computeTypeLinkageInfo used to expect only
records, and crash for anything else. It seems that the compiler never
executed this code path before patch #136128 where the issue was
reported.
Function member (test74):
MemberPointerType 'type-parameter-0-0 (type-parameter-0-1::*)(void)' dependent
|-TemplateTypeParmType 'type-parameter-0-1' dependent depth 0 index 1
`-FunctionProtoType 'type-parameter-0-0 (void)' dependent cdecl
`-TemplateTypeParmType 'type-parameter-0-0' dependent depth 0 index 0
Template parameter (test75):
MemberPointerType 'type-parameter-0-1 type-parameter-0-0::*' dependent
|-TemplateTypeParmType 'type-parameter-0-0' dependent depth 0 index 0
`-TemplateTypeParmType 'type-parameter-0-1' dependent depth 0 index 1
For non-record types, it should be enough to look at a pointee type to
determine linkage and visibility.
LIT tests 74 and 75 are reduced from Chromium and LLVM libc test
harness as reported in #136128.
0 commit comments