aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorQizhi Hu <836744285@qq.com>2024-02-03 21:49:09 +0800
committerGitHub <noreply@github.com>2024-02-03 21:49:09 +0800
commit752c172bc7d628fe5ce4a78f3620893b8d7bcfba (patch)
tree88a8f416c5f49ad5bcdc0d4d3f6e9f5808ed4013 /llvm/lib/Support/VirtualFileSystem.cpp
parent514d0691f4da40d5bb6d618a673e975b8eacfb77 (diff)
downloadllvm-752c172bc7d628fe5ce4a78f3620893b8d7bcfba.zip
llvm-752c172bc7d628fe5ce4a78f3620893b8d7bcfba.tar.gz
llvm-752c172bc7d628fe5ce4a78f3620893b8d7bcfba.tar.bz2
[Clang][Sema] fix outline member function template with default align crash (#80288)
Try to fix [issue](https://github.com/llvm/llvm-project/issues/68490 ) and some extented problem. Root cause of current issue is that error handling in instantiation of function parameter with default initialization on sizeof or align expression. When instance an out-of-line template member function, depth of `TemplateTypeParmDecl` in default initialization doesn't change while depth of other template parameter does and this will lead to some template parameter uninstanced. Also, sometime it will leader to wrong instantiation when it uses the template parameter of the template class. Fix it by add template args of context. This will make MultiLevelTemplateArgumentList::getNumLevels matching the depth of template parameter. Testcase with some static_assert demonstrates the template parameter has been instanced correctly. But, the default initialization of lambda expression compiles failed when only checking if the member function is out-of-line. We should check the `PrimaryFunctionTemplateDecl` of the funtion if it's out-of-line. Co-authored-by: huqizhi <836744285@qq.com>
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions