зеркало из https://github.com/microsoft/clang-1.git
simplify by relying on cascading operator->
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
13a8affbb8
Коммит
6a557d8f6b
|
@ -1185,13 +1185,13 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(FunctionDecl *D,
|
|||
R != REnd; ++R) {
|
||||
if (*R == Function)
|
||||
continue;
|
||||
if ((*R)->getFriendObjectKind() != Decl::FOK_None) {
|
||||
if (R->getFriendObjectKind() != Decl::FOK_None) {
|
||||
if (const FunctionDecl *RPattern
|
||||
= (*R)->getTemplateInstantiationPattern())
|
||||
= R->getTemplateInstantiationPattern())
|
||||
if (RPattern->hasBody(RPattern)) {
|
||||
SemaRef.Diag(Function->getLocation(), diag::err_redefinition)
|
||||
<< Function->getDeclName();
|
||||
SemaRef.Diag((*R)->getLocation(), diag::note_previous_definition);
|
||||
SemaRef.Diag(R->getLocation(), diag::note_previous_definition);
|
||||
Function->setInvalidDecl();
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче