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:
Yuanfang Chen 2021-12-15 10:25:37 -08:00
parent 8cb6ecbc4d
commit 0d1363e561
2 changed files with 0 additions and 16 deletions

View File

@ -9202,7 +9202,6 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
<< Name << RemoveRange
<< FixItHint::CreateRemoval(RemoveRange)
<< FixItHint::CreateInsertion(InsertLoc, "<>");
Invalid = true;
}
}
} else {

View File

@ -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;
}