diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 5e9c92db81b4..b1312a7ccc51 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -9202,7 +9202,6 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, << Name << RemoveRange << FixItHint::CreateRemoval(RemoveRange) << FixItHint::CreateInsertion(InsertLoc, "<>"); - Invalid = true; } } } else { diff --git a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p20-2.cpp b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p20-2.cpp deleted file mode 100644 index 7bc5f13cd737..000000000000 --- a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p20-2.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s -template -void f(T); - -template -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 a; -}