forked from OSchip/llvm-project
Revert "[Sema] Mark explicit specialization declaration in a friend invalid"
This reverts commit 8cb6ecbc4d
.
Nothing wrong with the commit. It is missing Phabricator informations.
This commit is contained in:
parent
8cb6ecbc4d
commit
0d1363e561
|
@ -9202,7 +9202,6 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
|
|||
<< Name << RemoveRange
|
||||
<< FixItHint::CreateRemoval(RemoveRange)
|
||||
<< FixItHint::CreateInsertion(InsertLoc, "<>");
|
||||
Invalid = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||||
template<typename T>
|
||||
void f(T);
|
||||
|
||||
template<typename T>
|
||||
struct A {
|
||||
// expected-error@+1{{cannot declare an explicit specialization in a friend}}
|
||||
template <> friend void f<>(int) {}
|
||||
};
|
||||
|
||||
// Makes sure implicit instantiation here does not trigger
|
||||
// the assertion "Member specialization must be an explicit specialization"
|
||||
void foo(void) {
|
||||
A<int> a;
|
||||
}
|
Loading…
Reference in New Issue