forked from OSchip/llvm-project
Never try to instantiate a deduction guide's "definition". Fixes bogus warning when there inevitably isn't one.
llvm-svn: 316820
This commit is contained in:
parent
49687104d6
commit
cb18957da0
|
@ -3768,7 +3768,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
|
||||||
bool Recursive,
|
bool Recursive,
|
||||||
bool DefinitionRequired,
|
bool DefinitionRequired,
|
||||||
bool AtEndOfTU) {
|
bool AtEndOfTU) {
|
||||||
if (Function->isInvalidDecl() || Function->isDefined())
|
if (Function->isInvalidDecl() || Function->isDefined() ||
|
||||||
|
isa<CXXDeductionGuideDecl>(Function))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Never instantiate an explicit specialization except if it is a class scope
|
// Never instantiate an explicit specialization except if it is a class scope
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// RUN: %clang_cc1 -std=c++1z -verify %s -DERRORS
|
// RUN: %clang_cc1 -std=c++1z -verify %s -DERRORS -Wundefined-func-template
|
||||||
// RUN: %clang_cc1 -std=c++1z -verify %s -UERRORS
|
// RUN: %clang_cc1 -std=c++1z -verify %s -UERRORS -Wundefined-func-template
|
||||||
|
|
||||||
// This test is split into two because we only produce "undefined internal"
|
// This test is split into two because we only produce "undefined internal"
|
||||||
// warnings if we didn't produce any errors.
|
// warnings if we didn't produce any errors.
|
||||||
|
|
Loading…
Reference in New Issue