mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 07:21:04 +01:00
Allow interop with templated but non-template functions. (#5809)
For example, this would allow using `std::string::size`, which is templated because it's a member of the class template `std::basic_string`, but isn't itself a function template.
This commit is contained in:
@@ -1073,7 +1073,8 @@ static auto ImportFunctionDecl(Context& context, SemIR::LocId loc_id,
|
||||
MarkFailedDecl(context, clang_decl);
|
||||
return SemIR::ErrorInst::InstId;
|
||||
}
|
||||
if (clang_decl->getTemplatedKind() != clang::FunctionDecl::TK_NonTemplate) {
|
||||
if (clang_decl->getTemplatedKind() ==
|
||||
clang::FunctionDecl::TK_FunctionTemplate) {
|
||||
context.TODO(loc_id, "Unsupported: Template function");
|
||||
MarkFailedDecl(context, clang_decl);
|
||||
return SemIR::ErrorInst::InstId;
|
||||
|
||||
Reference in New Issue
Block a user