aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2021-06-22 15:14:26 -0700
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2021-06-22 17:26:05 -0700
commitc9aaf34b8db884faa3d3ced4d2fb88fd45697408 (patch)
tree401dbfe5c9026754bea3fc300c699f6eca51349f /clang/lib/Frontend/CompilerInvocation.cpp
parent5c8659801a4976ef2b327f4071d98086efd42a36 (diff)
downloadllvm-c9aaf34b8db884faa3d3ced4d2fb88fd45697408.zip
llvm-c9aaf34b8db884faa3d3ced4d2fb88fd45697408.tar.gz
llvm-c9aaf34b8db884faa3d3ced4d2fb88fd45697408.tar.bz2
[SemaCXX] Handle lack of TypeSourceInfo on special member functions in templated lambdas
During template instantiation involving templated lambdas, clang could hit an assertion in `TemplateDeclInstantiator::SubstFunctionType` since the functions are not associated with any `TypeSourceInfo`: `assert(OldTInfo && "substituting function without type source info");` This path is triggered when using templated lambdas like the one added as a test to this patch. To fix this: - Create `TypeSourceInfo`s for special members and make sure the template instantiator can get through all patterns. - Introduce a `SpecialMemberTypeInfoRebuilder` tree transform to rewrite such member function arguments. Without this, we get errors like: `error: only special member functions and comparison operators may be defaulted` since `getDefaultedFunctionKind` can't properly recognize these functions as special members as part of `SetDeclDefaulted`. Fixes PR45828 and PR44848 Differential Revision: https://reviews.llvm.org/D88327
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions